Prime Checker - Rebol Typing CST Test
Loading…
Prime Checker — Rebol Code
Checks if a number is prime.
is-prime?: func [n][
if n < 2 [return false]
foreach i 2 to n - 1 [
if n // i = 0 [return false]
]
true
]
print either is-prime? 13 ["Prime"] ["Not Prime"]Rebol Language Guide
REBOL (Relative Expression-Based Object Language) is a lightweight, cross-platform programming language designed for network communications, data exchange, and scripting. It emphasizes simplicity, human-readable syntax, and rapid development of distributed applications.
Primary Use Cases
- ▸Network protocols and communication
- ▸Scripting and automation
- ▸Rapid prototyping of applications
- ▸Data exchange with custom dialects
- ▸Embedded or lightweight distributed applications
Notable Features
- ▸Lightweight and portable across platforms
- ▸Human-readable, minimalistic syntax
- ▸Support for DSLs (domain-specific languages) via dialects
- ▸Built-in networking, GUI, and file-handling capabilities
- ▸Dynamic typing with flexible data structures
Origin & Creator
Developed in 1997 by Carl Sassenrath, creator of the AmigaOS multitasking kernel.
Industrial Note
REBOL is particularly valued in environments where compact, portable scripts for networking, automation, or embedded systems are required.