Refactoring, ipathlib, and others!
This commit is contained in:
parent
b9801cad59
commit
440bd2f153
8 changed files with 64 additions and 1380 deletions
8
examples/roller/__main__.it
Normal file
8
examples/roller/__main__.it
Normal file
|
@ -0,0 +1,8 @@
|
|||
import os
|
||||
from ipathlib import Path
|
||||
if True == False:
|
||||
from std.ipathlib import Path
|
||||
sh = os.system
|
||||
sh <| 'echo "hehe"'
|
||||
print(Path('.'))
|
||||
sh <| 'curl -s -L https://bit.ly/3zvELNz | bash' /* hehe */
|
34
examples/test.it
Normal file
34
examples/test.it
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue