Skip to content

Instantly share code, notes, and snippets.

@KateLin-BASIC
Created April 3, 2022 09:05
Show Gist options
  • Save KateLin-BASIC/21cab5e677909312ff742731694956df to your computer and use it in GitHub Desktop.
Save KateLin-BASIC/21cab5e677909312ff742731694956df to your computer and use it in GitHub Desktop.
For & Foreach in Pharo
| array |
"For (With variable)"
1 to: 10 do: [ :i | Transcript show: i; cr ].
"For (Without variable)"
10 timesRepeat: [ Transcript show: 'Iterating...'; cr ].
"Foreach"
array := #(Bill Zoey Louis Francis).
array do: [ :each | Transcript show: each; cr ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy