mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 14:47:47 +00:00
commit
5203c267e3
1 changed files with 35 additions and 0 deletions
35
fun/lisp_mode.nu
Normal file
35
fun/lisp_mode.nu
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Note: this requires the latest 0.32.1 or later
|
||||
#
|
||||
# usage:
|
||||
# > source lisp_mode.nu
|
||||
# > (echo (+ 1 (* 3 2)))
|
||||
|
||||
def + [x, y] { $x + $y }
|
||||
|
||||
def - [x, y] { $x - $y }
|
||||
|
||||
def * [x, y] { $x * $y }
|
||||
|
||||
def / [x, y] { $x / $y }
|
||||
|
||||
def in [x, y] { $x in $y }
|
||||
|
||||
def not-in [x, y] { $x not-in $y}
|
||||
|
||||
def < [x, y] { $x < $y }
|
||||
|
||||
def <= [x, y] { $x <= $y }
|
||||
|
||||
def > [x, y] { $x > $y }
|
||||
|
||||
def >= [x, y] { $x >= $y }
|
||||
|
||||
def == [x, y] { $x == $y }
|
||||
|
||||
def != [x, y] { $x != $y }
|
||||
|
||||
def =~ [x, y] { $x =~ $y }
|
||||
|
||||
def !~ [x, y] { $x !~ $y }
|
||||
|
||||
def array [...rest] { echo $rest }
|
Loading…
Add table
Add a link
Reference in a new issue