You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it stands U-Z all default to 0. Would it be possible to change those defaults to something else, with each parameter being different?
This would give room for 6 new variables/shortcuts, presuming, of course that no arguments are passed through them.
I haven't given much thought to what the new defaults could be yet but one possibility might be an empty array of length U, equivalent to [...Array(U)] in ES6. Unless I've missed a trick, which could well be the case after less than 24 hours working with it, there's currently no shortcut for that in Japt.
The text was updated successfully, but these errors were encountered:
Yes, good idea. I've been considering changing the default value of V to 1 to help with recursive programs (fibonacci, for example), not sure what the others should be though. If you need to, you can get an all-zero array of the same length as U with Uî.
Thanks, @ETHproductions. I've since figured out a few other ways of generating an array of length U - as [...Array(U)] generates an array of empty elements, usually in order to map over it, avoiding the need for any sort of loop, the contents of the array don't much matter.
Back to the issue at hand, I still haven't put much more thought into what the new default parameters could be, but I'd suggest that they be assigned to the input variables in order of least to most useful, thereby reducing the risk of overwriting the most useful ones.
As it stands U-Z all default to
0
. Would it be possible to change those defaults to something else, with each parameter being different?This would give room for 6 new variables/shortcuts, presuming, of course that no arguments are passed through them.
I haven't given much thought to what the new defaults could be yet but one possibility might be an empty array of length
U
, equivalent to[...Array(U)]
in ES6. Unless I've missed a trick, which could well be the case after less than 24 hours working with it, there's currently no shortcut for that in Japt.The text was updated successfully, but these errors were encountered: