We should define a data type for the 4 plants, instead of returning strings. The test file will define Eq and Show.
We will use a Vect 4, instead of a List.
We can use Maybe, with an added test case asking for the plants grown by "Zechariah". (Idris uses types like Maybe and Either, instead of having exceptions that don't appear in a function's type signature.)
We should define a data type for the 4 plants, instead of returning strings. The test file will define Eq and Show.
We will use a
Vect 4
, instead of aList
.We can use
Maybe
, with an added test case asking for the plants grown by"Zechariah"
. (Idris uses types like Maybe and Either, instead of having exceptions that don't appear in a function's type signature.)