Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Raku (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Lazy evaluation=== Raku uses the technique of [[lazy evaluation]] of lists that has been a feature of some [[functional programming]] languages such as [[Haskell (programming language)|Haskell]]:<ref name="syn9">{{cite web | url=https://design.raku.org/S09.html | title=Synopsis 9: Data Structures | author=Wall, Larry | date=2004-09-13 }}</ref> <syntaxhighlight lang="raku"> @integers = 0..Inf; # integers from 0 to infinity </syntaxhighlight> The code above will not crash by attempting to assign a list of infinite size to the array <code>@integers</code>, nor will it hang indefinitely in attempting to expand the list if a limited number of slots are searched. This simplifies many common tasks in Raku including input/output operations, list transformations, and parameter passing.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)