-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mult param bug fix and add an example file
- Loading branch information
1 parent
7349b8d
commit e9b8b02
Showing
1 changed file
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from pyhell import autoenable | ||
from pyhell.hstypes import HaskellString, HaskellFunction | ||
from Data.List import sort, take #import from haskell | ||
|
||
two = HaskellFunction.from_string("2"); | ||
x = HaskellString(take(two, sort(HaskellString("pyhell")))) | ||
#just checked the type and build the expression, it had not executed yet | ||
print("the code", x.hs_code, "was not executed yet, simulating the lazily of Haskell: ", x._data) | ||
print("now, when 'x' is direct accessed the code was evaluated and the result '", x, "' was cached to next use") |