Skip to content

xchrishawk/racket99

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Racket99

This is a work-in-progress implementation of the L99 Lisp problem set using Racket, a variant of Scheme Lisp.

Features

  • Unit tests using RackUnit to demonstrate correctness of the algorithms
  • Racket contracts to ensure correct usage of functions

Allowed Functions

To keep true to the spirit of the challenge, only a limited subset of Lisp functions are used to implement the problems themselves (basically those which would be available in most implementations of Lisp). These include:

  • +, -, *, /, =, <, >, etc.
  • add1
  • and
  • car/cdr (and variants like cadr)
  • cond
  • cons
  • equal?
  • if
  • inexact->exact
  • let/let*
  • list
  • list?
  • map
  • modulo
  • not
  • null
  • null?
  • or
  • remainder
  • sqrt
  • sub1
  • truncate
  • values

In addition, if an implementation for a function has been given in a previous solution, it's OK to use the built-in version for later problems. These functions include:

  • append (implemented in P07-flatten-list.rkt as append-list)
  • gcd (implemented in P32-greatest-common-divisor.rkt as greatest-common-divisor)
  • length (implemented in P04-count-list.rkt as count-list)
  • list-ref (implemented in P03-element-at.rkt as element-at)
  • reverse (implemented in P04-reverse-list.rkt as reverse-list)
  • split-at (implemented in P17-split.rkt as split)

Other functions are fair game for unit tests.

About

Racket Implementation of L99

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages