Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 584 Bytes

peel.md

File metadata and controls

34 lines (22 loc) · 584 Bytes

peel

Try to peel a tropical fruit to eat.

tropic.peel(TropicalFruit.Banana);

Parameters

  • fruit: a TropicalFruit to peel and eat, which is either: banana, pineapple, or coconut.

Returns

  • a boolean value which is true if the fruit was peeled, false if not.

Example

Try and pick a coconut from a tropical tree. Can you peel it?

let peeled = false
if (tropic.pick(TropicalFruit.Coconut)) {
    peeled = tropic.peel(TropicalFruit.Coconut)
}

See also

pick

tropic