Skip to main content
fix wording
Source Link
ibotty
  • 206
  • 1
  • 4

e.g. in makeFunc

e.g. makeFunc

e.g. in makeFunc

fix captilization
Source Link
ibotty
  • 206
  • 1
  • 4

bikeBike shedding

generalGeneral advice

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)

useUse Applicative 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)

use Applicative 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)

Use Applicative 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

fix single-space to make code-format work
Source Link
rolfl
  • 97.5k
  • 17
  • 218
  • 418

readOrThrow parser input = left Parser $ parse parser "lisp"

readOrThrow parser input = left Parser $ parse parser "lisp"

readOrThrow parser input = left Parser $ parse parser "lisp"

readOrThrow parser input = left Parser $ parse parser "lisp"
Source Link
ibotty
  • 206
  • 1
  • 4
Loading