view paper/src/exec_tail_in_haskell.txt @ 92:0354d3693324 default tip

Added tag paper_final for changeset 6a12eb22be8c
author Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
date Sun, 01 Mar 2015 13:08:51 +0900
parents 1181b4facaf9
children
line wrap: on
line source

*Main> :type Main.tail
Main.tail :: List a -> List a
*Main> let list = Cons 100 (Cons 200 (Cons 300 Nil)) :: List Int
*Main> :type list
list :: List Int
*Main> :type even :: Int -> Bool
even :: Int -> Bool :: Int -> Bool

*Main> :type (fmap even list)
fmap even list :: List Bool
*Main> :type Main.tail (fmap even list)
Main.tail (fmap even list) :: List Bool

*Main> :type (Main.tail list)
Main.tail list :: List Int
*Main> :type fmap even (Main.tail list)
fmap even (Main.tail list) :: List Bool

*Main> Main.tail (fmap even list)
Cons True (Cons True Nil)
*Main> fmap even (Main.tail list)
Cons True (Cons True Nil)