a one dimensional cellular automata, using comonads
Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- module Comonad where
-
- -------------------
- -- comonad class --
- -------------------
-
- class Functor w => Comonad w
- where
- (=>>) :: w a -> (w a -> b) -> w b
- extract :: w a -> a
- duplicate :: w a -> w (w a)
- x =>> f = fmap f (duplicate x)
|