egison-tutorial 3.3.4 → 3.3.5
raw patch · 2 files changed
+5/−5 lines, 2 filesdep ~egison
Dependency ranges changed: egison
Files
- Main.hs +2/−2
- egison-tutorial.cabal +3/−3
Main.hs view
@@ -307,7 +307,7 @@ Content "We can define a function. Let's define a function and test it." ["(define $f (lambda [$x] (+ x 1)))", "(f 10)", "(define $g (lambda [$x $y] (* x y)))", "(g 10 20)", "(define $sum (lambda [$n] (foldl + 0 (take n nats))))", "(sum 10)"] ["Try to define a 'fact' function."],- Content "We can compare numbers using functions that return '#t' or '#f'.\n'#t' means the true.\n#f means the false.\nFunctions that return '#t' or '#f' are called \"predicates\"."+ Content "We can compare numbers using functions that return '#t' or '#f'.\n'#t' means the true.\n'#f' means the false.\nFunctions that return '#t' or '#f' are called \"predicates\"." ["(eq? 1 1)", "(gt? 1 1)", "(lt? 1 1)", "(gte? 1 1)", "(lte? 1 1)"] [], Content "With the 'while' function, we can extract all head elements that satisfy the predicate.\n'primes' is a infinites list that contains all prime numbers."@@ -326,7 +326,7 @@ ["[1]", "[[[1]]]"] [], Content "With the 'zip' function, we can combine two lists as follow."- ["(take 100 (zip * nats nats))", "(take 100 (zip * primes primes))"]+ ["(take 100 (zip nats nats))", "(take 100 (zip primes primes))"] ["Try to create the prime table that is like '{[1 2] [2 3] [3 5] [4 7] [5 11] ...}'"], Content "We can bind a value to a variable with a 'define' expression.\nWe can easily get the value we bound to the variable." ["(define $x 10)", "x", "(define $ps (zip nats primes))", "(take 100 ps)"]
egison-tutorial.cabal view
@@ -1,8 +1,8 @@ Name: egison-tutorial-Version: 3.3.4+Version: 3.3.5 Synopsis: A tutorial program for the programming language Egison Description: A tutorial program for the programming language Egison.- Egison is the programming langugage that realized non-linear pattern-matching with unfree data types.+ Egison is the programming langugage that realized non-linear pattern-matching against unfree data types. With Egison, you can represent pattern-matching with unfree data types intuitively, especially for collection data, such as lists, multisets, sets. Please learn Egison with this tutorial program! Homepage: http://www.egison.org@@ -20,4 +20,4 @@ Executable egison-tutorial Main-is: Main.hs- Build-depends: egison >= 3.3.4, base >= 4.0 && < 5, array, containers, unordered-containers, haskeline, transformers, mtl, parsec >= 3.0, directory, ghc, ghc-paths, filepath, regex-posix, strict-io, bytestring+ Build-depends: egison >= 3.3.7, base >= 4.0 && < 5, array, containers, unordered-containers, haskeline, transformers, mtl, parsec >= 3.0, directory, ghc, ghc-paths, filepath, regex-posix, strict-io, bytestring