1) Make a sample instance for each sketch from the previous page:

FULLPET = pet(100, 100)

 

MIDPET = pet(50, 75)

 

LOSEPET = pet(0, 0)

2) Write at least one NEW example for one of the functions on your To-Do list

next-state-tick(FULLPET) is pet(FULLPET.hunger – 2, FULLPET.sleep – 1)

next-state-tick(MIDPET) is pet(MIDPET.hunger – 2, MIDPET.sleep – 1)

next-state-tick(LOSEPET) is LOSEPET

3) If you have another function on your To-Do list, write at least one NEW example

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). CCbadge Bootstrap:Reactive by Emma Youndtsmith, Emmanuel Schanzer, Kathi Fisler, Shriram Krishnamurthi, Joe Politz and Dorai Sitaram is licensed under a Creative Commons 4.0 Unported License. Based on a work at www.BootstrapWorld.org. Permissions beyond the scope of this license may be available by contacting schanzer@BootstrapWorld.org.