Skip to content
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

Add @memoize in steps.annotation #4

Closed
wants to merge 5 commits into from

Conversation

hamzaremmal
Copy link
Member

@hamzaremmal hamzaremmal commented Oct 3, 2024

Add prototype of a general use memoize annotation

  • Write the documentation

@hamzaremmal hamzaremmal added area:annotations Related to the steps.annotation package area:metaprogramming labels Oct 3, 2024
@hamzaremmal hamzaremmal self-assigned this Oct 3, 2024
@hamzaremmal
Copy link
Member Author

I'm not a fan of these formating rules tbh..

@hamzaremmal hamzaremmal marked this pull request as ready for review October 5, 2024 16:26
Comment on lines +103 to +108
if $cache.contains($key) then
$cache($key)
else
val res = $rhs
$cache($key) = res
res
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use $cache.getOrElseUpdate

@hamzaremmal hamzaremmal closed this by deleting the head repository Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants