Skip to content

Latest commit

 

History

History
59 lines (53 loc) · 848 Bytes

algo.md

File metadata and controls

59 lines (53 loc) · 848 Bytes

algo.elv

  1. testing-status
  2. fibs
  3. primes
  4. levenshtein

testing-status

4 tests passed out of 4

100% of tests are passing

Miscelaneous algorithms and generators to showcase rivendell. May not be useful.


fibs

This is a var that represents an infinite list of fibonacci numbers.

l:take 10 $fibs | l:blast
▶ 1
▶ 1
▶ 2
▶ 3
▶ 5
▶ 8
▶ 13
▶ 21
▶ 34
▶ 55

primes

Function which returns an iterator which represents an infinite list of primes.

l:take 10 (primes) | l:blast
▶ 2
▶ 3
▶ 5
▶ 7
▶ 11
▶ 13
▶ 17
▶ 19
▶ 23
▶ 29

levenshtein

basic levenshtein function to measure the distance between two strings.

levenshtein hello hello
▶ 0
levenshtein hello world
▶ 4