NEWTON

NEWTON


Popular tags

    Cairo Passing Functions

    Asked

    4 months ago

    3

    views


    0

    How would I go about passing a function as a parameter to a function. Ex map(function, array)

    This question was originally posted on Triality

      Cairocairo-langcairo

    1 answers

    0

    You can use get_label_location() on the name of the function, and then pass this in and use it to call the function.

    ie. let (function_name) = get_lable_location()

    map(function_name, array)

    This also works with storage variables since they are represented as functions.

    This answer was originally posted on Triality

    answered

    4 months ago

    Your answer

    NEWTON

    NEWTON