can I select over functions?
Thu Jun 10 23:23:49 CEST 2004
From: "Marc van Woerkom" <>
> The pseudo code in the icfp contest task had some piece
> case instruction of
> move(Ant, Steps) ->
> turn(LeftRight) ->
> sense(Direction, Time, Moonphase) ->
> where the different cases are not simple values like a
> token for the intended instruction, but functions.
What are you actually trying to do here, compare Instruction with the actual
functions (i.e. it is a function) or compare it with the values of the
evaluated functions? The name(...) syntax means a function call. There is no
real way of defining a function object except with fun's and comparing funs
works but is limited.
More information about the erlang-questions