- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
instance Applicative (Sample m) where
pure a = Val a
Val{_unVal=f} <*> a = fmap f a
Fork{..} <*> a = Fork {
_next = \x -> (_next x) <*> a
, ..
}
Zero <*> _ = Zero
Random{..} <*> a = Random { -- Crazy-ass weirdo haskeller, why did you define instance Random for ->?!!
_next = \x -> (_next x) <*> a
, ..
}
chtulhu 08.05.2016 16:09 # 0
CHayT 08.05.2016 18:07 # 0
kegdan 08.05.2016 17:36 # +1
CHayT 08.05.2016 18:03 # +2
kegdan 08.05.2016 18:07 # +2
guest 11.06.2016 00:07 # −2