Package: arl 0.1.4

arl: Embedded Lisp Dialect

Provides a Scheme-inspired Lisp dialect embedded in R, with macros, tail-call optimization, and seamless interoperability with R functions and data structures. (The name 'arl' is short for 'An R Lisp.') Implemented in pure R with no compiled code.

Authors:William Brannon [aut, cre, cph]

arl_0.1.4.tar.gz
arl_0.1.4.zip(r-4.7)arl_0.1.4.zip(r-4.6)arl_0.1.4.zip(r-4.5)
arl_0.1.4.tgz(r-4.6-any)arl_0.1.4.tgz(r-4.5-any)
arl_0.1.4.tar.gz(r-4.7-any)arl_0.1.4.tar.gz(r-4.6-any)
arl_0.1.4.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
arl/json (API)

# Install 'arl' in R:
install.packages('arl', repos = c('https://wwbrannon.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/wwbrannon/arl/issues

On CRAN:

Conda:

6.89 score 3 stars 26 scripts 531 downloads 6 exports 1 dependencies

Last updated from:b6381ffe00. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK266
source / vignettesOK234
linux-release-x86_64OK296
macos-release-arm64OK166
macos-oldrel-arm64OK146
windows-develOK275
windows-releaseOK241
windows-oldrelOK315
wasm-releaseOK99

Exports:arl_html_vignettecliCoverageTrackerEngineinstall_cliregister_knitr_engine

Dependencies:R6

Examples
Fibonacci | Quicksort | FizzBuzz | Macro Examples | Pipeline Macros | Data Analysis | Graph Paths | Log Parser | Sales Report | Task Runner

Last update: 2026-03-12
Started: 2026-01-26

Benchmarks
Pipeline Overview | End-to-End Timings | Optimizations Applied | Benchmark Data | Running Benchmarks

Last update: 2026-02-23
Started: 2026-02-12

Getting Started
Installation | Start the REPL | Run from the command line | Evaluate Arl from R | Passing R data to the engine | Run Arl files | Loading stdlib modules | R functions are available directly | Core syntax and semantics | Truthiness | Definitions and functions | Local bindings | Conditionals | Sequencing | Lists and quoting | Getting help | Documenting your functions | Next steps

Last update: 2026-02-21
Started: 2026-01-26

Runtime Options
Precedence | Setting values | User-facing settings | Shell-only settings | Examples | Internal settings | Related guides

Last update: 2026-02-21
Started: 2026-02-13

Functions
Defining Functions | Parameter Features | Required parameters | Optional parameters with defaults | Rest parameters | Destructuring parameters | Combining parameter styles | Destructuring | destructuring-bind | Destructuring in function parameters | Calling Functions | Positional arguments | Keyword arguments | Local Functions | let / let* for simple local functions | letrec for recursive local functions | Higher-Order Functions | Recursion | Self-TCO (automatic) | loop / recur | Macros vs Functions | Related guides

Last update: 2026-02-21
Started: 2026-02-14

Language Reference
Special forms | Built-in functions | Inherited R functions | What "inherited" means | Examples of commonly used inherited functions | When Arl shadows R | Beyond base: R's default packages | Standard library | Importing modules | Core, R Interop, and Testing | Types, Equality, and Conversions | Control Flow and Macros | Lists and Sequences | Strings, Display, and I/O | Collections and Data Structures | Higher-Order Functions | Math and Numeric Functions | Source files

Last update: 2026-02-21
Started: 2026-02-14

Macros and Quasiquote
Overview: what kind of macros does Arl support? | Defining a macro | Macro parameters | Fixed parameters | Rest parameters | Optional parameters with defaults | Pattern destructuring in parameters | Quasiquote, unquote, and splicing | Quasiquote basics | Splicing lists | Nested quasiquote | Hygiene | Automatic hygiene example | How it works | gensym -- generating fresh symbols | When to use gensym | capture -- intentional variable capture (anaphoric macros) | Signature | Example: anaphoric if | How capture interacts with hygiene | Compile-time computation | Recursive and composing macros | Inspecting macro expansions | From Arl | From R | Real-world examples from the standard library | let -- parallel bindings with gensym | loop/recur -- Clojure-style iteration | try/catch/finally -- syntax sugar | Related guides

Last update: 2026-02-21
Started: 2026-01-26

Standard Library: Collections and Data Structures
Dictionary (Hash Table) | dict-new | dict-key-to-name | dict | hash | dict? | dict-keys-ordered | dict-get | dict-set | dict-remove | dict-keys | dict-values | dict-has? | dict-merge | Dictionary Transformation | dict-update | dict-map | dict-filter | dict-for-each | dict->alist | alist->dict | Set (Hash-Backed) | set-new | set-key | set | set? | set-add | set-remove | set-contains? | set-union | set-intersection | set-difference | set-copy-into | Set Conversion and Transformation | set->list | list->set | set-size | set-map | set-filter | Struct Definition | defstruct

Last update: 2026-02-21
Started: 2026-02-14

Standard Library: Control Flow and Macros
Control Flow Macros | when | unless | Conditional Macros | cond | case | Error Handling | try | try-catch | Continuations | call-cc | call-with-current-continuation | Binding Macros | pattern-symbols | destructuring-bind | let | let* | letrec | when-let | if-let | Looping Macros | do-list | recur | loop | until | Threading Macros | -> | ->> | as-> | some-> | some->> | cond-> | cond->>

Last update: 2026-02-21
Started: 2026-02-14

Standard Library: Core, R Interop, and Testing
Special Forms | quote | if | define | set! | lambda | begin | defmacro | quasiquote | unquote | unquote-splicing | and | or | while | delay | import | module | Error and Warning | error | warn | Identity and Values | identity | values | values? | call-with-values | Function Application | funcall | r-call | get | unbind-variable | run | License | license | Macro Introspection | macroexpand-1 | macroexpand-all | R Nonstandard Evaluation Wrappers | suppressWarnings | suppressMessages | with | within | subset | transform | substitute | Assertion Helpers | assert | assert-equal | assert-true | assert-false | assert-eq | assert-error | assert-no-error | Arithmetic | + | * | - | / | Comparison | < | <= | > | >= | = | == | != | not | Evaluation | eval | read | write | load | r-eval | Documentation | help | doc! | doc | Macro Utilities | capture | gensym | macro? | macroexpand | Promises (Lazy Evaluation) | promise? | force | promise-expr | Environment Introspection | toplevel-env | builtins-env | current-env | Module Introspection | module-ref | module? | namespace? | module-exports | module-name

Last update: 2026-02-21
Started: 2026-02-14

Standard Library: Higher-Order Functions
Core Higher-Order Functions | map | mapcat | filter | remove | reduce | foldl | foldr | every? | any? | complement | compose | partial | Advanced Functional Programming | curry | juxt | constantly | iterate | iterate-until | memoize | Iteration and Counting | for-each | count | map-indexed | group-by | frequencies | Logical Operations | not | xor

Last update: 2026-02-21
Started: 2026-02-14

Standard Library: Lists and Sequences
List Operations | call | caar | cadr | cdar | cddr | caaar | caadr | cadar | caddr | cdaar | cdadr | cddar | cdddr | cadddr | cddddr | list* | append | reverse | first | second | third | fourth | rest | last | nth | car | cdr | cons | Association Lists | assoc | assoc-by-equal? | assoc-by-identical? | assoc-by-== | assq | assv | rassoc | rassoc-by-equal? | List Generation | range | iota | make-list | Additional List Accessors | list-ref | list-tail | Sequence Helpers | take | drop | take-while | drop-while | partition | flatten | repeatedly | repeat | zip | member | contains? | Length Predicates | length= | length> | length< | Search and Deduplication | find | distinct | Splitting | split-at | split-with | interpose | partition-by | Sorting | list-sort | sort-by | merge-sorted | stable-sort

Last update: 2026-02-21
Started: 2026-02-14

Standard Library: Math and Numeric Functions
Arithmetic Helpers | % | inc | dec | clamp | within? | signum | Power and Roots | expt | Integer Division | quotient | remainder | modulo | Number Theory | gcd | lcm | Complex Number Utilities | make-rectangular | make-polar | real-part | imag-part | magnitude | angle

Last update: 2026-02-21
Started: 2026-02-14

Standard Library: Strings, Display, and I/O
String Operations | string-join | string-split | trim | string-format | string-contains? | string-match? | string-find | string-replace | string-replace-all | string-append | ->string | char-at | string-ref | string-slice | string-length | String Case | string-upcase | string-downcase | string-titlecase | String Comparison | string<? | string>? | string=? | string<=? | string>=? | String/List Conversion | string->list | list->string | number->string | string->number | String Predicates | string-prefix? | string-suffix? | string-empty? | string-repeat | Console I/O | read-line | read-from-string | write-string | newline | File I/O | read-file | read-lines | write-file | write-lines | append-file | file-exists? | file-size | file-modified-time | file-delete | Directory Operations | directory-exists? | directory-list | directory-delete | Environment and System | getenv | setenv | system-output | exit | format-value | Display and Output | display | println | string-concat | trace

Last update: 2026-02-21
Started: 2026-02-14

Standard Library: Types, Equality, and Conversions
List and Pair Predicates | list? | list-or-pair? | null? | nil? | atom? | empty? | pair? | Symbol Predicates | symbol? | keyword? | Basic Type Predicates | number? | string? | vector? | boolean? | true? | false? | Function Predicates | fn? | callable? | procedure? | Environment Predicates | environment? | is-refclass? | Type Introspection | type-of | Numeric Type Predicates | real? | complex? | rational? | exact? | inexact? | integer? | natural? | finite? | infinite? | nan? | Value Predicates | even? | odd? | zero? | positive? | negative? | non-negative? | non-positive? | Equality Predicates | equal? | identical? | eq? | eqv? | Helper Functions for Equal? | env-equal? | list-equal? | S3 Dispatch System | s3-type | check-s3-type-match | set-method! | use-method | Built-in Equal? Methods | equal?.default | equal?.list | equal?.environment | Symbol Conversions | symbol->string | string->symbol | ->symbol | Numeric Conversions | ->number | Scheme-Style Exact/Inexact Conversions | exact->inexact | inexact->exact | R-Style Numeric Conversions | ->integer | ->double | ->complex | Collection Conversions | ->list | ->vector

Last update: 2026-02-21
Started: 2026-02-14

Troubleshooting
Zero is falsy | list? vs base::is.list on quoted forms | Use #t / #f, not T / F | load vs import vs run | Self-TCO limitations | Macro hygiene and gensym | Module not found errors | Stack traces with TCO-optimized functions | Related guides

Last update: 2026-02-21
Started: 2026-02-10

Tail Call Optimization
How It Works | What Counts as Tail Position | Advanced Features | Disabling TCO for Debugging | loop/recur | Summary

Last update: 2026-02-20
Started: 2026-02-12

Arl Compared to Scheme
Common ground | Core differences | Evaluation model | Data model | Pairlists vs R lists | Truthiness | Numeric edge cases (R semantics) | Numeric Tower Differences | Keywords and named arguments | Tail-call optimization | Interop | Module system | Macro systems | Scheme: pattern-based syntax-rules | Arl: procedural defmacro with automatic hygiene | Hygiene: different approaches to the same goal | Summary of differences | Special forms | When to think "Scheme" vs "R" | Related guides

Last update: 2026-02-18
Started: 2026-02-12

R Interop and Data Workflows
Calling R functions | Keyword syntax | r-call | r-eval | Non-standard evaluation | Detecting errors with a sentinel value | substitute | Working with formulas | Accessing R objects | Managing bindings | Numeric edge cases | Passing data between R and Arl | Example workflow | Standard library helpers | Related guides

Last update: 2026-02-18
Started: 2026-01-26

Modules and Imports
Overview | The load Function | Signature | Examples | Path Resolution | Re-evaluation | The run Function | The module Special Form | Nameless Modules | Export Strategies | The import Special Form | Qualified Access | Import Modifiers | Module Registration and Scoping | Module Introspection | Error Handling | Creating User Modules | Basic Module Structure | Module with Private Helpers | Nested Module Loading | Standard Library Modules | Best Practices | 1. Use Explicit Exports | 2. Organize Related Functionality | 3. Document Module Purpose | 4. Avoid Circular Dependencies | 5. Use Load Path Conventions | Differences from Other Lisps | vs. Common Lisp | vs. Scheme | vs. Clojure | Summary

Last update: 2026-02-18
Started: 2026-01-31

Documenting Functions and Macros
Annotation comments (;;') | Supported tags | Runtime documentation with doc! | Retrieving documentation with doc | Which mechanism to use

Last update: 2026-02-17
Started: 2026-02-13

Compiler and Internals
Pipeline overview | What "compilation" means | Inspecting the compilation pipeline | Special form dispatch | Self-tail-call optimization | Constant folding and dead code elimination | Coverage instrumentation | Reserved internal names | Related guides

Last update: 2026-02-14
Started: 2026-02-10