Commit 2fd86920 authored by Gilles Coremans's avatar Gilles Coremans
Browse files

Complete the definition for ToList for Combles

parent 487e2451
......@@ -45,7 +45,8 @@ toList c = go c [] where
go Empty acc = acc
go (Pure x) acc = x : acc
go (Alt t u _) acc = go t (go u acc)
go (App t u _) acc = undefined
go (App (Pure fun) arg _) acc = fmap fun (toList arg) ++ acc
go (App fun arg _) acc = ((toList fun) <*> (toList arg)) ++ acc
data Tree elem = Leaf | Node (Tree elem) elem (Tree elem) deriving Show
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment