Reductor
A toy language that shows how simple and elegant the concepts behind concatenative languages are.
Install / Use
/learn @ympbyc/ReductorREADME
reductor
A toy language that shows how easy it is to implement a powerful concatenative language, and nothing more.
[ "examples/quot.reductor" load,
:double (int -- int)
[ 2 * ] define,
:map ([a] (a -- b) -- [b])
[ over empty?
[ drop ]
[ [ [ car ] [ cdr ] bi ] dip
tuck map [call] dip swap cons ]
if ] define,
[ 1 2 3 4 5 ] [ double ] map . ]
install
git clone https://github.com/ympbyc/reductor.git
cd reductor
lein deps
running
cat examples/map.reductor | lein run
test
a=`cat examples/map.reductor | lein run`
if [ $a = "(2 4 6 8 10)" ] ; then
echo "ok"
else
echo "error"
fi
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
