Git Product home page Git Product logo

lisp-jam's Introduction

Lisp Jam

an unmanageable pleasant jam of Lisp functions, written by Lusine Keshishyan | tado-mi in spring 2019, while working as a teaching assistant for initially for the CSC 173 course at the University of Rochester, in order to learn & practice Lisp, as well as get more familiar with functional programming paradigm. It is made public to demonstrate a code sample by the author, and for learning. We trust it will not be used to violate academic honesty policies.

Functions are as simple as their names. The restrictions for the project, however, were, to avoid using any imperative constructs, such as variables (setq), or for loops. The recommendation was to go on town with recursion.

The code has extensive comments for both your convenience and sanity, and mine.

There is no 'extra' interactivity with the user implemented (such as a (set of) REPL functions), as I found that to be an uninspiring syntactic challenge. In order to load functions for testing (load main.lisp). If you need a lisp compiler, abcl may be useful.

Files

Lists

  • append two lists
  • reverse a list
  • map a function over every element in a list (called mapcar in Lisp)
  • remove duplicates from a list
  • fold-left (arguments: initial value, function, list)
  • filte list with a boolean function
  • merge two sorted lists
  • add an element to the end of a list
  • index of an element in a list
  • remove all e from a list l

Sets

  • set membership
  • insert element into set
  • intersection
  • union
  • set difference
  • symmetric difference (disjunctive union)
  • subset
  • superset
  • cardinality
  • powerset

Mathematics

  • absolute value
  • factorial
  • gcd
  • lcm
  • nth fibonacci number
  • test if a number is prime
  • nth prime number
  • sum of factors

lisp-jam's People

Contributors

tado-mi avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.