Reactive: running sunset reactor

1 view
Skip to first unread message

Reetu Singh

unread,
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:

definitions://:21:0-23:3
22
fun draw-state(a-SunsetState-x-value, a-SunsetState-y-value) :
23
  put-image(ground, 300, 10, (put-image(sun, a-SunsetState-x-value, a-SunsetState-y-value, sky)))
24
end 

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

unread,
Jun 13, 2019, 1:01:25 PM6/13/19
to bootstra...@googlegroups.com
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 bootstrap-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bootstrap-discuss/86a9853e-bbf0-4a19-92ba-16e0de6de5a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
This message was sent from my phone.
Reply all
Reply to author
Forward
0 new messages