Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Io language 'apply arguments'

Tags:

iolanguage

In the Io programming language, is there an equivalent to lisp's apply function.

So for example I have a method to wrap writeln :

mymeth := method(
              //do some extra stuff

             writeln(call message arguments))
)

At the moment this just prints the list, and doesn't evaluate it's contents as if they were it's own args.

like image 965
lucas1000001 Avatar asked Dec 12 '10 00:12

lucas1000001


1 Answers

Thanks to that person who suggested evalArgs (not sure where your comment went).

Anyway that has resolved for my situation, although unfortunately not in general I guess.

You can achieve what I describe by doing :

writeln(call evalArgs join)

This evaluates all arguments, and then joins the results into a single string.

like image 151
lucas1000001 Avatar answered Oct 23 '22 03:10

lucas1000001