Sha256: a5e134671e582854174cec58e6cf9588ce474644940086eaf233ec696c1c75a9

Contents?: true

Size: 366 Bytes

Versions: 396

Compression:

Stored size: 366 Bytes

Contents

(defpackage #:anagram
  (:use #:common-lisp)
  (:export #:anagrams-for))

(in-package #:anagram)

(defun anagram-equal (a b)
  (and
   (string-equal (sort (copy-seq a) #'char-lessp)
		 (sort (copy-seq b) #'char-lessp))
   (string-not-equal a b)))

(defun anagrams-for (subject candidates)
  (remove-if-not
   #'(lambda (w) (anagram-equal w subject))
   candidates))

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.179 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.178 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.177 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.176 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.175 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.174 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.173 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.172 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.171 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.170 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.169 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.167 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.166 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.165 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.164 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.163 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.162 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.161 tracks/common-lisp/exercises/anagram/example.lisp
trackler-2.2.1.160 tracks/common-lisp/exercises/anagram/example.lisp