Skip to content

Commit

Permalink
fix examples and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdagos committed Aug 6, 2016
1 parent 0595413 commit bc4df9b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,17 @@ The language supports automatic currying:
```
module Main where
/**
* Adds two values
*/
def addValues [x, y] = + $ x y
def add2 [y] = addValues $ 2
def main [] = {
puts-ln $ (add2 $ 2); // Will output '4'
val add2 = addValues $ 2;
val four = add2 $ 2;
// Will output '4'
puts-ln $ four;
}
```

Expand Down
10 changes: 4 additions & 6 deletions test/parser_tests/automatic_curry.bl
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ module Main where
*/
def addValues [x, y] = + $ x y

/**
* Returns a lambda
*/
def add2 [x1] = addValues $ 2

def main [] = {
val add2 = addValues $ 2;
val four = add2 $ 2;
puts-ln $ four; // Will output '4'

// Will output '4'
puts-ln $ four;
}

0 comments on commit bc4df9b

Please sign in to comment.