Skip to content

Instantly share code, notes, and snippets.

View themaxhero's full-sized avatar
😀

Marcelo Amancio de Lima Santos themaxhero

😀
View GitHub Profile
@themaxhero
themaxhero / HeroLisp Testing.livemd
Last active July 3, 2024 12:07
HeroLISP.livemd

NimbleParsec Playground

Mix.install([
  {:nimble_parsec, "~> 1.0"}
])

My first ever try to make a LISP with

defmodule CeasarCipher do
@lower Enum.to_list(?a..?z)
@upper Enum.to_list(?A..?Z)
defp map_within_range(c, range, shift) do
if c in range do
range
|> Stream.cycle()
|> Stream.drop(shift + (c - hd(range)))
|> Stream.take(1)