Arc Forumnew | comments | leaders | submitlogin
2 points by tokipin 6141 days ago | link | parent

in other languages i write a function that i call fix which does the same as the _ notation except that the _ represents a general "hole to be filled later" and can be present any number of times

take for example a function named 'print' which accepts string, r, g, and b arguments

  (= my-prn (fix print "message" _ _ _))
so that

  (my-prn 0 0 1)
would print "message" in blue

  (= my-prn (fix print _ 0 _ 0))
  (my-prn "test" 1)
would print "test" in green. if built into the language it could be done something like:

  (= my-prn1 (print "message" _ _ _))
  (= my-prn2 (print _ 0 _ 0))