solve problem 2 in uiua (again)

This commit is contained in:
2025-08-30 11:37:16 +02:00
parent 34de4ce78b
commit ccd2a9aa9f

7
2/main.ua Normal file
View File

@@ -0,0 +1,7 @@
# project euler 2
↘1⍢(
⊂⊸(⊢+⊸⬚0↻1↙2) # generate next term from last two \
| <4e6⊢ # until we shoot over 4000000.
) [1 1] # start with 1, 1 for fib. seq.
▽¬⊸◿₂ # filter on even.
/+ # sum.