Andy Melnikov (nponeccop) wrote,
Andy Melnikov
nponeccop

Полку кметтов прибыло

https://github.com/sjoerdvisscher

Нашёл у него потенциально полезную штуку http://hackage.haskell.org/package/algebraic-classes

Ещё free-functors например. Мне понравилось определение непустых списков как свободных полугрупп:
import Data.Functor.Free
import Data.Semigroup

-- A free semigroup allows you to create singletons and append them.
-- So it is a non-empty list.
type NonEmptyList = Free Semigroup

-- These instances make NonEmptyList a Semigroup and Show-able, Foldable and Traversable.
deriveInstances ''Semigroup
Я кончил! © Домнин Ф.А.
Tags: fp, programming
Subscribe

  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments