Hi,


   Howdy Ladislav:


   In this example you posted:

   -------------------------------------------------------

   >> block1: [do func[f [any-function!]] [print "OK"] func [x] [print
"OK"]]
   == [do func [f [any-function!]] [print "OK"] func [x] [print "OK"]]

   >> block2: [do func [f [any-function!]] [print "OK"]]
   == [do func [f [any-function!]] [print "OK"]]

   >> append block2 :f
   == [do func [f [any-function!]] [print "OK"] func [x][print "OK"]]

   -------------------------------------------------------

      What is the :f that you are appending above?  It is not
  refered to elsewhere in your example.


   -jeff

[L]

I think you can see f either in block2 or in block1

I give you another example:

Your composite function:

composite: func ['f 'g][func [x] compose [(f) (g) x]]
f: func [x [any-function!]] ["OK"]
g: func [x] [:x]
x: func [x] ["OK"]
fg: composite f g


[correcting the typo:]

>> result: fg :x
** Script Error: x is missing its x argument.
** Where: result: fg x

Trivia question:

What is the correct result?

Ladislav


Reply via email to