possible bug in repl (function call)?

21 views
Skip to first unread message

ben

unread,
Oct 3, 2012, 11:44:18 AM10/3/12
to lispy...@googlegroups.com
hi

this works when running with a file, but not with the repl

lispy> LispyScript REPL v0.2.7
lispy> (var print (function (x) (console.log x)))
undefined
lispy> (print "hi")
[ReferenceError: print is not defined]


regards
ben

Santosh Rajan

unread,
Oct 3, 2012, 11:58:51 AM10/3/12
to lispy...@googlegroups.com

Hi,
This is a very simple REPL. All the code you try must be on the same line.
This will work.
lispy> (var print (function (x) (console.log x))) (print "hi") 

I think I must mention this on the repl start line. Will do in the next version.
Thanks for pointing out.

Santosh

Santosh Rajan

unread,
Oct 4, 2012, 3:24:32 AM10/4/12
to lispy...@googlegroups.com, lispy...@ben.mailc.net

The latest version on github supports multiline expressions. So this code will work now. Also will be there in next npm release which I will post about here.


On Wednesday, 3 October 2012 21:25:13 UTC+5:30, ben wrote:
Reply all
Reply to author
Forward
0 new messages