Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 24 lines (21 sloc) 0.996 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
(require 'monads)
(require 'functional)
(require 'utils)


(defvar *people* '(:ted :lea :leo :james :harvey :sally :jane :andrew :catherine) "A list of all the people that matter.")
(defvar *friends-db*
'((:ted (:lea :leo :sally :andrew :catherine :leo :jane))
(:lea (:ted :leo :jane :andrew :harvey :sally :catherine))
(:leo (:ted :lea :ted :harvey :sally :jane :andrew :catherine
:harvey :andrew :catherine))
(:james (:jane :harvey :jane))
(:harvey (:leo :lea :leo :james :harvey :harvey :sally))
(:sally (:ted :leo :lea :harvey :jane :andrew))
(:jane (:lea :leo :james :sally :ted :james :andrew :catherine))
(:andrew (:ted :lea :leo :sally :jane :leo))
(:catherine (:ted :leo :lea :leo :jane :catherine :catherin))) "Our database of friend connections.")

(defun friends-of (person)
  "Return a list of all the people in friends-db."
  (alist *friends-db* person)
;alist is a function which retrieves
;a key's data from an association list.
)
Something went wrong with that request. Please try again.