RosettaCodeData/Task/Langtons-ant/Haskell/langtons-ant-2.hs

6 lines
108 B
Haskell
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
-- functional sequence
(>>>) = flip (.)
-- functional choice
p ?>> (f, g) = \x -> if p x then f x else g x