8000 Do we want a rune to name the main arm of a core? · Issue #7044 · urbit/urbit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Do we want a rune to name the main arm of a core? #7044

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sigilante opened this issue Jul 29, 2024 · 2 comments
Open

Do we want a rune to name the main arm of a core? #7044

sigilante opened this issue Jul 29, 2024 · 2 comments

Comments

@sigilante
Copy link
Collaborator

It may be convenient/legible to have a rune or pattern that names the $ arm of a core something like loop instead. You can do this manually, but e.g. |, loop or similar.

|%
++  factorial
  |=  x=@ud
  =/  total  1
  |,  loop
  ?~  x
    total
  loop(total (mul total x), x (sub x 1))
--
@sigilante
Copy link
Collaborator Author

Naming the default arm of a trap |. isn't so helpful directly, but naming it and kicking it |- is.

@mikolajpp
Copy link
Contributor

In my mind, when in a trap $ just means loop. Even with nested loops ^$ is pretty clear. Perhaps this rune would be useful for cases of many nested traps with non-trivial calling patterns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0