type fruit(sequence unknown_fruit)
- Posted by vmars May 20, 2009
- 889 views
From A Beginners Guide to Euphoria:
type fruit(sequence unknown_fruit)
sequence valid_fruit
valid_fruit = {"bananas", "apples", "oranges", "pears"}
return find(unknown_fruit, valid_fruit)
end type
This is wierd to me.
It would make more sense like this:
fruit_check = "pears"
fruit fruit_check
puts(1, "Program Run Completed\n")
or
fruit_check = "pears"
fruit_check = fruit(fruit_check)
puts(1, "Program Run Completed\n")
Please, Why is it structured like this?
Thanks!