Re: [Jprogramming] procedure test and delayed eval

2020-01-16 Thread 'Michael Day' via Programming
Not sure what you want... I find this description of "procedure?" at https://www.cs.cmu.edu/Groups/AI/html/r4rs/r4rs_8.html essential procedure: procedure? obj Returns #t if obj is a procedure, otherwise returns #f. (procedure? car)    =>  #t (procedure? 'car)   =>  #f (proce

Re: [Jprogramming] procedure test and delayed eval

2020-01-16 Thread Raul Miller
What do you mean by "better"? That said, there are several "native" ways of representing code in J: 1) as a sequence of characters (J can be thought of as a virtual machine with ascii mapped as machine instructions) 2) as a file (typically represented as a file name) 3) as a gerund (you can use `

Re: [Jprogramming] procedure test and delayed eval

2020-01-16 Thread Julian Fondren
datatype 3 : 0 n=. 1 2 4 8 16 32 64 128 1024 2048 4096 8192 16384 32768 65536 131072 262144 t=. '/boolean/literal/integer/floating/complex/boxed/extended/rational' t=. t,'/sparse boolean/sparse literal/sparse integer/sparse floating' t=. t,'/sparse complex/sparse boxed/symbol/unicode/unicode4' (

[Jprogramming] procedure test and delayed eval

2020-01-16 Thread Raoul Schorer
Hi, I am translating scheme code that makes heavy use of delayed evaluation (thunks). In scheme, there is a predicate 'procedure?' that returns a boolean. I translated that into a check for a boxed string, which is the representation I use for delayed procedures, which I then 'force' using ".@>