Refactoring, ipathlib, and others!

This commit is contained in:
Xander Mckay 2024-10-09 19:31:52 -04:00
parent b9801cad59
commit 440bd2f153
8 changed files with 64 additions and 1380 deletions

34
examples/test.it Normal file
View file

@ -0,0 +1,34 @@
def fibonacci(x: int) -> list[int]:
start = [0,1]
for i in range(1, x):
start.append <| start[i] + start[i - 1]
return start
a = 12 |> fibonacci
b = a :: a :: a :: a
c = b :: b :: b :: b
print <| [i for i in c]
print <*| ('a', 'b', 'c')
d = lambda x: x * 2
#d2 = λ x: x * 2
d3d = curry <| (lambda x, y: x**2 + y**2)
print(d3d(2,4))
print(d3d(2)(4))
print(d3d(x=2)(y=4))
@curry
def d3d2(x,y) = x**2 + y**2
print(d3d2(2,4))
print(d3d2(2)(4))
print(d3d2(x=2)(y=4))
a = 1
a++
a |> print ?? 11 |> print
'''a'''
/*
very bad code that is
commented out for a very
good reason
*/
a++ /* something */ # something