Mercurial > hg > Papers > 2015 > atton-thesis
annotate src/exec_list_in_haskell.txt @ 18:086fc8bb6ea9
Add description for category/functor in program
author | Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 08 Feb 2015 21:19:55 +0900 |
parents | |
children |
rev | line source |
---|---|
18
086fc8bb6ea9
Add description for category/functor in program
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 *Main> let x = 100 :: Int |
086fc8bb6ea9
Add description for category/functor in program
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 *Main> let even = even :: Int -> Bool |
086fc8bb6ea9
Add description for category/functor in program
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 *Main> :type x |
086fc8bb6ea9
Add description for category/functor in program
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 x :: Int |
086fc8bb6ea9
Add description for category/functor in program
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 *Main> :type even |
086fc8bb6ea9
Add description for category/functor in program
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 even :: Int -> Bool |
086fc8bb6ea9
Add description for category/functor in program
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 *Main> :type (even x) |
086fc8bb6ea9
Add description for category/functor in program
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 (even x) :: Bool |
086fc8bb6ea9
Add description for category/functor in program
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 |
086fc8bb6ea9
Add description for category/functor in program
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 *Main> let list = Cons x Nil |
086fc8bb6ea9
Add description for category/functor in program
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 *Main> :type list |
086fc8bb6ea9
Add description for category/functor in program
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 list :: List Int |
086fc8bb6ea9
Add description for category/functor in program
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
13 *Main> :type fmap even list |
086fc8bb6ea9
Add description for category/functor in program
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 fmap even list :: List Bool |