Home   Archive   Permalink



How to get a function with a refinement

I can do this,
     r: :random
     r 100
     >> 43
    
is it possible to get a function with one of its refinements?
     r: :random/only
     >> ** Script Error: random is missing its value argument


posted by:   Endo       10-Jun-2010/10:20:03-7:00



I guess the nearest method can be:
    
r: 'random/only
    
do r
    
There are probably better ways?

posted by:   Henrik       10-Jun-2010/10:27:31-7:00



r: func [x] [random/only x]

posted by:   Nick       10-Jun-2010/11:07:06-7:00



Also:
    
r: :random
r/only 100

posted by:   Nick       10-Jun-2010/11:08:14-7:00



Thanks, I was wondering is it possible to use get-word with refinement. I used all of them you mentioned :)

posted by:   Endo       10-Jun-2010/11:36:38-7:00