Alternative to procedure? (in Scheme)

56 views
Skip to first unread message

Oscar Finnsson

unread,
Aug 14, 2013, 4:52:53 PM8/14/13
to program...@googlegroups.com
Hi,

is there something like Schemes "procedure?" in Nu that can check if a variable is a procedure/lambda/do/NuBlock?

I'm using 

    (function do? (v) (send v isKindOfClass:(NuBlock class)))

but not sure if this is robust and if there is build in functionality for this already.

Regards,
Oscar

Tim Burks

unread,
Aug 14, 2013, 5:56:30 PM8/14/13
to program...@googlegroups.com
Hi Oscar,

I haven't created anything else - and I'm not aware of any other approaches. What you've shown should be fine because functions and lambda expressions are all internally represented as NuBlock instances.

Tim


--
You received this message because you are subscribed to the Google Groups "Programming Nu" group.
To unsubscribe from this group and stop receiving emails from it, send an email to programming-n...@googlegroups.com.
To post to this group, send email to program...@googlegroups.com.
Visit this group at http://groups.google.com/group/programming-nu.
For more options, visit https://groups.google.com/groups/opt_out.

Oscar Finnsson

unread,
Aug 16, 2013, 2:52:54 AM8/16/13
to program...@googlegroups.com
Excellent. Thanks!

Oscar
Reply all
Reply to author
Forward
0 new messages