Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
// requires jaskell and jaskell engine and jparsec and jfunutil jars
engine = mgr.getEngineByName("jaskell")
println 'jaskell: ' + engine.eval('''
4 * 3 * 2 * 1
// BUG? Jaskell not currently returning correct result for below
//factorial n = if n > 0 then n * factorial (n-1) else 1')
//factorial 4
''println 'jaskell: ' + engine.eval('factorial 4')

The output from running these scripts is:

...