Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
  • 한국어
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
  • 한국어
GitHub
  • Introduction
  • Installation
    • Default Shell
  • Getting Started
    • Quick Tour
    • Moving Around the System
    • Thinking in Nu
    • Nushell Cheat Sheet
  • Nu Fundamentals
    • Types of Data
    • Loading Data
    • Pipelines
    • Working with Strings
    • Working with Lists
    • Working with Records
    • Working with Tables
    • Navigating and Accessing Structured Data
    • Special Variables
  • Programming in Nu
    • Custom Commands
    • Aliases
    • Operators
    • Variables
    • Control Flow
    • Scripts
    • Modules
      • Using Modules
      • Creating Modules
    • Overlays
    • Sorting
    • Testing your Nushell Code
    • Best Practices
  • Nu as a Shell
    • Configuration
    • Environment
    • Stdout, Stderr, and Exit Codes
    • Running System (External) Commands
    • How to Configure 3rd Party Prompts
    • Directory Stack
    • Reedline, Nu's Line Editor
    • Custom Completions
    • Externs
    • Coloring and Theming in Nu
    • Hooks
    • Background Jobs
  • Coming to Nu
    • Coming from Bash
    • Coming from CMD.EXE
    • Coming from PowerShell
    • Nu map from other shells and domain specific languages
    • Nu Map from Imperative Languages
    • Nu Map from Functional Languages
    • Nushell operator map
  • Design Notes
    • How Nushell Code Gets Run
  • (Not So) Advanced
    • Standard Library
    • Dataframes
    • Metadata
    • Creating Your Own Errors
    • Parallelism
    • Plugins
    • explore
    • Building TUIs with tui

Nu Map from Functional Languages

The idea behind this table is to help you understand how Nu builtins and plugins relate to functional languages. We've tried to produce a map of relevant Nu commands and what their equivalents are in other languages. Contributions are welcome.

Note: this table assumes Nu 0.116.0 or later.

NushellClojureTablecloth (Ocaml / Elm)Haskell
appendconj, into, concatappend, (++), concat, concatMap(++)
into binaryInteger/toHexStringshowHex
lengthcountlength, sizelength, size
datejava.time.LocalDate/now
differenceclojure.set/difference(\\)
eachmap, mapv, iteratemap, forEachmap, mapM
exitSystem/exit
generateiterateiterate, unfoldr
firstfirstheadhead
formatformatText.Printf.printf
group-bygroup-bygroup, groupBy
helpdoc
intersectclojure.set/intersectionintersect
is-emptyempty?isEmpty
lastlast, peek, take-lastlastlast
lineslines, words, split-with
matchmatch (Ocaml), case (Elm)case
selectnthArray.getlookup
openwith-open
transpose(apply mapv vector matrix)transpose
par-eachpmapparMap
prependconscons, ::::
printprintlnputStrLn, print
slice, 1..10rangerange1..10, 'a'..'f'
reducereduce, reduce-kvfoldrfoldr
reversereverse, rseqreverse, reverseInPlacereverse
selectselect-keys
shuffleshuffle
lengthcountsize, length
skipresttailtail
skip untildrop-while
skip whiledrop-whiledropWhiledropWhile, dropWhileEnd
sort-bysort, sort-by, sorted-set-bysort, sortBy, sortWithsort, sortBy
split rowsplit, split-{at,with,lines}split, words, linessplit, words, lines
strclojure.string functionsString functions
str joinjoinconcatintercalate
str trimtrim, triml, trimrtrim, trimLeft, trimRightstrip
math sumapply +sumsum
taketake, drop-last, poptake, inittake, init
take untiltake-whiletakeWhiletakeWhile
take whiletake-whiletakeWhiletakeWhile
unionclojure.set/unionunion
uniqsetSet.emptyData.Set
wherefilter, filterv, selectfilter, filterMapfilter
zipmap vectorzip
Edit this page on GitHub
Contributors: Carson Black, Ibraheem Ahmed, Jonathan Turner, Hristo Filaretov, JT, fdncred, Justin Ma, Aaron Christiansen, Anselm Schüler, Stefan Holderbach, Zhora Trush, Dan Davison, Leon, casually-blue, BrewingWeasel, Hofer-Julian, ಠ_ಠ
Prev
Nu Map from Imperative Languages
Next
Nushell operator map