This article has moved to the Specs-on-Spec repository.
Just a little survey of what code to create an anonymous function and immediately call it looks like in a handful of high-level languages. All of these expressions should evaluate to 10.
Language | Code |
---|---|
Python | (lambda x: x+1)(9) |
Ruby | (lambda {|x| x+1}).call(9) |
Lua | (function(x) return x+1 end)(9) |
Erlang | (fun(X) -> X+1 end)(9) |
Haskell | (\x -> x+1)(9) |
This article has moved into the SixtyPical repository.
This code has moved into The Dipple:
This code has moved into The Dipple:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
bind '"\e[A":history-search-backward' | |
bind '"\e[B":history-search-forward' | |
export PATH="$HOME/.cabal/bin:$HOME/.local/bin:$PATH" | |
export EDITOR=nano | |
alias unpyc="find . -name '*.pyc' -exec rm -f {} \;" | |
alias rsyncavd="rsync --archive --verbose --delete" | |
alias git-savepatch='git diff >' | |
alias chintzy-httpd='python2 -m SimpleHTTPServer' |
Running Extraordinarily-Dull.samovar through search-based solvers added to samovar 0.5
OlderNewer