Facebook
From Innocent Zebra, 8 Years ago, written in Haskell.
This paste is a reply to Untitled from Sole Hamster - view diff
Embed
Download Paste or View Raw
Hits: 491
  1. leftA :: Auto a q -> Auto a (Either q r)
  2. leftA (A s ini ac t) = (A st init acc tr) where
  3.         st = map (Left) s
  4.         init = map (Left) ini
  5.         acc = either ac (\x->False)
  6.         tr (Left s) w = map (Left) (t s w)
  7.         tr (Right s) w = []