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

6 lines
108 B
Haskell
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
-- functional sequence
(>>>) = flip (.)
-- functional choice
p ?>> (f, g) = \x -> if p x then f x else g x