Reactive: running sunset reactor

1 view
Skip to first unread message

Reetu Singh

Jun 12, 2019, 4:59:17 PM6/12/19
to Bootstrap-Teachers

I am running the sunset reactor.  When I hit run, everything looks "shipshape" when I type in interact (sunset-react) 
I get the following message 

An application errored.

1 argument was passed to the operator.

The operator evaluated to a function defined to accept 2 parameters:

fun draw-state(a-SunsetState-x-value, a-SunsetState-y-value) :
  put-image(ground, 300, 10, (put-image(sun, a-SunsetState-x-value, a-SunsetState-y-value, sky)))

An application expects the number of parameters and arguments to be the same.

I don't know what this is referring to especially about the parameters and the arguments being the same.

Thank you!

Joe Gibbs Politz

Jun 13, 2019, 1:01:25 PM6/13/19
Thanks for your message Reetu, it’s a good question.

One of the key phrases in Unit 3, which introduces draw-state, is

The second step in making an animation is to write a function that consumes an instance of one state and produces the image for that instance.”

Based on this description, what should the *contract* of draw-state be? I’m focusing in particular on the part of the description that says “consumes *an instance*” of one state. This is a place where the contract, purpose statement, and examples of the draw-state function could help us understand what the rest of the program is expecting of draw-state.

You received this message because you are subscribed to the Google Groups "Bootstrap-Teachers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit
This message was sent from my phone.
Reply all
Reply to author
0 new messages