从函数式语言到 Nu

这个表格的目的是帮助你了解 Nu 的内置和插件所提供命令与函数式语言的关系。我们试图制作一张所有 Nu 命令和它们在其他语言中的映射关系的表。欢迎大家参与贡献。

注意:此表针对 Nu 0.43 或更高版本。

NushellClojureTablecloth (Ocaml / Elm)Haskell
alias
appendconj, into, concatappend, (++), concat, concatMap(++)
args
autoview
math avg
into binaryInteger/toHexStringshowHex
calc, <math expression>math operators
cd
clear
clip
compact
config
countcountlength, sizelength, size
cp
datejava.time.LocalDate/now
debug
default
drop
du
eachmap, mapv, iteratemap, forEachmap
echoprintlnputStrLn, print
enter
exitSystem/exit
fetch()
firstfirstheadhead
formatformatText.Printf.printf
from
get
group-bygroup-bygroup, groupBy
headers
helpdoc
histogram
history
inc()incsucc
insert
empty?empty?isEmpty
keeptake, drop-last, poptake, inittake, init
keep-until
keep-whiletake-whiletakeWhiletakeWhile
kill
lastlast, peek, take-lastlastlast
lineslines, words, split-with
ls
match()re-matches, re-seq, re-find
merge
mkdir
mv
next
nthnthArray.getlookup
openwith-open
parse
transpose(apply mapv vector matrix)transpose
post()
prependconscons, ::::
prev
ps
pwd
range, 1..10rangerange1..10, ‘a’..’f’
reducereduce, reduce-kvfoldrfoldr
reject
rename
reversereverse, rseqreverse, reverseInPlacereverse
rm
save
selectselect-keys
shells
shuffleshuffle
sizecountsize, length
skipresttailtail
skip until
skip whiledrop-whiledropWhiledropWhile, dropWhileEnd
sort-bysort, sort-by, sorted-set-bysort, sortBy, sortWithsort, sortBy
split-bysplit, split-{at,with,lines}split, words, linessplit, words, lines
split column
split row
str()clojure.string functionsString functions
str collectjoinconcatintercalate
str trimtrim, triml, trimrtrim, trimLeft, trimRightstrip
sumapply +sumsum
sys
table
tags
tree()
to
touch
uniqsetSet.emptyData.Set
upsert
version
with_env
what
wherefilter, filterv, selectfilter, filterMapfilter
which
wrap
  • * - 这些命令是标准插件的一部分