Skip to content

Instantly share code, notes, and snippets.

console.log(document.title)
defmodule Advent3 do
def generate(lastNum, next_element_fn), do: generate({1, 0, 0}, %{{0, 0} => 1}, 0, 0, 0, 0, lastNum, "right", next_element_fn)
def generate({num, x, y}, _, _, _, _, _, lastNum, _, _) when num >= lastNum do
IO.inspect(abs(x) + abs(y))
IO.inspect(num)
end
def generate({num, x, y}, map, top, right, bottom, left, lastNum, "right", next_element_fn) do
nextValue = next_element_fn.({num, x + 1, y}, map)
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks