Skip to content

university assignments in Common Lisp (CS 3210)

Notifications You must be signed in to change notification settings

ebjohnston/edu-lisp

Repository files navigation

Common Lisp

Course Assignments for CS 3210
Spring 2016
Dr. Judith Gurka
Metropolitan State University of Denver

Assignments

01 Factorial

This program returns the factorial of a given non-negative integer or NIL if the input is negative or not an integer.

02 Move to Front

This program checks to see if a word is in a list. If so, the word is moved to the front of the list. If not, the word is appended to the front of the list.

03 Divisible by Five

This program checks a list of numbers and returns the amount of numbers divisible by five.

04 Remove Negatives

This program takes as input a list of integers and returns a new list with all the negative entries removed.

05 Search Count

This program searches through a list for a given integer and returns the number of matches found in all lists, including embedded lists

06 Is Sorted

This program returns whether a list of number is sorted in strictly ascending order with no duplicate entries.

07 Temperature Conversion

This program takes a temperature in the form of a number and a unit (either Celsius or Fahrenheit) and returns the temperature value converted to the other unit.

08 Twin

This program returns a list that duplicates each input element into a pair of adjacent elements in the output list.

09 Untwin

This program returns a list that removes an element if it is identical to the element directly previous in a list with the comparison done in pairs of two (maximum of one deletion per pair).

10 Flatten

This program takes a list potentially containing nested lists and returns all embedded elements as members of a new top-tier list with NIL (the empty list) not being returned as an element of the new list.

11 Set Operations

This program contains three functions that each emulate a traditional set operation: member, which returns whether a word is an element of a given list; union, which returns the union of two lists as a new list; and intersect, which returns the intersection of two lists as a new list.

12 Syntax Check

This program checks whether a list is a valid expression of the form: number - operator - number with number representing an integer and operator being one of the following: plus, minus, times, or dividedby. Each expression can contain nested expressions on either side.

About

university assignments in Common Lisp (CS 3210)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published