Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Adds and removes items in a shopping cart with total cost.
cart: copy []
prices: copy []
addItem: func [item price] [
append cart item
append prices price
print rejoin ["Cart: " cart]
print rejoin ["Total: " sum prices]
]
removeItem: func [index] [
remove cart index
remove prices index
print rejoin ["Cart: " cart]
print rejoin ["Total: " sum prices]
]
; Simulate actions
addItem "Apple" 2
addItem "Banana" 3
removeItem 1Rebol and its modern descendant Red are high-level, cross-platform programming languages designed for simplicity, domain-specific languages, and full-stack development. Rebol emphasizes compact syntax and data exchange, while Red adds native compilation, GUI support, and system-level capabilities.
Origin & Creator
Rebol was created by Carl Sassenrath in 1997 to enable efficient data exchange and scripting. Red was initiated in 2011 by Nenad Rakocevic as a modern, native successor to Rebol.
Industrial Note
Rebol/Red excels in small-footprint tools, cross-platform GUI apps, DSL creation, and scripting tasks that benefit from concise syntax and runtime flexibility.