doc-src/Codegen/Thy/examples/Example.hs
changeset 34171 0928909af6aa
parent 32360 79b5b3031c87
child 37428 b3d94253e7f2
equal deleted inserted replaced
34170:254ac75e4c38 34171:0928909af6aa
     1 {-# OPTIONS_GHC -fglasgow-exts #-}
     1 {-# OPTIONS_GHC -fglasgow-exts #-}
     2 
     2 
     3 module Example where {
     3 module Example where {
     4 
       
     5 
     4 
     6 foldla :: forall a b. (a -> b -> a) -> a -> [b] -> a;
     5 foldla :: forall a b. (a -> b -> a) -> a -> [b] -> a;
     7 foldla f a [] = a;
     6 foldla f a [] = a;
     8 foldla f a (x : xs) = foldla f (f a x) xs;
     7 foldla f a (x : xs) = foldla f (f a x) xs;
     9 
     8