Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Here params :: LispVal -> [String] will fail for ever LispVal that is not a function. Better use a separate Typetype and let the sum type simple. e.g.:
useUse meaningful names
getGet rid of meaningless type synonyms (ThrowError, IOThrowError)
useUseApplicative style when parsing
avoidAvoid shadow bindings
supplySupply type signatures for all toplevel functions
useUse pure values and functions whenever possible
tryTry to reject invalid scheme programs before interpreting them
bike shedding
general advice
Here params :: LispVal -> [String] will fail for ever LispVal that is not a function. Better use a separate Type and let the sum type simple. e.g.:
use meaningful names
get rid of meaningless type synonyms (ThrowError, IOThrowError)
useApplicative style when parsing
avoid shadow bindings
supply type signatures for all toplevel functions
use pure values and functions whenever possible
try to reject invalid scheme programs before interpreting them
Bike shedding
General advice
Here params :: LispVal -> [String] will fail for ever LispVal that is not a function. Better use a separate type and let the sum type simple. e.g.:
Use meaningful names
Get rid of meaningless type synonyms (ThrowError, IOThrowError)
UseApplicative style when parsing
Avoid shadow bindings
Supply type signatures for all toplevel functions
Use pure values and functions whenever possible
Try to reject invalid scheme programs before interpreting them