-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Allow generate to accept just a closure with a default value #12084
Copy link
Copy link
Closed
Labels
category:enhancementNew feature or requestNew feature or requeststatus:needs-triageAn issue that hasn't had any proper lookAn issue that hasn't had any proper look
Milestone
Description
Related problem
I might be getting ahead of myself, but with #12056 on the horizon, it would be nice to have generate support this feature.
Describe the solution you'd like
As mentioned in #11318 ...
> let fibGenerator = {
|fib = [ 0,1 ]|
{
out: $fib.0,
next: [$fib.1, ($fib.0 + $fib.1)]
}
}
> generate $fibGenerator | first 5
╭───┬───╮
│ 0 │ 0 │
│ 1 │ 1 │
│ 2 │ 1 │
│ 3 │ 2 │
│ 4 │ 3 │
╰───┴───╯Describe alternatives you've considered
No response
Additional context and details
I believe #12083 would also be required in order for this to happen. Perhaps these should be combined, but I'm not sure - Leaving them as two requests for now.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
category:enhancementNew feature or requestNew feature or requeststatus:needs-triageAn issue that hasn't had any proper lookAn issue that hasn't had any proper look