Skip to content

Instantly share code, notes, and snippets.

@5310
Last active December 25, 2022 15:12
Show Gist options
  • Save 5310/08c84323ea250fc86eaa80762f8bea16 to your computer and use it in GitHub Desktop.
Save 5310/08c84323ea250fc86eaa80762f8bea16 to your computer and use it in GitHub Desktop.
Learning BQN with Project Euler
# Euler 1 expression
+´ ×⟜(∨´ 0 = 3‿5 | ⊢)¨ ↕100
# Euler 1 operator
_comb_ ← {𝕩 𝔽 𝕨 𝔾 𝕩}
3‿5 +´∘×_comb_(∨˝ (0 = |⌜)) ↕100
Fibonacci ← { ((𝕨⊸>)(¯1⊸⊑))◶⟨𝕩, 𝕨⊸𝕊⟩ (∾⟜(+´⟨-2, -1⟩⊸⊏) 𝕩) }
+´×⟜(2⊸|) (4000000 Fibonacci 0‿1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment