auto generate `def` arguments
See original GitHub issueit will be nice to have babel plugin or something like that to transform code from this
// concatS :: String -> String -> String
const concatS = (x, y) => x + y
to this:
// concatS :: String -> String -> String
const concatS =
def('concatS', {}, [$.String, $.String, $.String], (x, y) => x + y);
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:18 (11 by maintainers)
Top Results From Across the Web
Generate function with arguments filled in when creating it?
Generate function with arguments filled in when creating it? ; import io def ; a_value): a_func = make_concrete_func(a_value) write_to_file([ ...
Read more >Is it possible to autogenerate a TypedDict from function ...
Is it possible to autogenerate a TypedDict from function arguments?
Read more >Is there a feature to automatically add in named parameters ...
is there any way to have the plugin automatically generate these for a new method? e.g.. I have this function: def foo(a:Int, b:...
Read more >Defining Your Own Python Function
In this tutorial, you'll learn how to define and call your own Python function. You'll also learn about passing data to your function,...
Read more >Don't automatically use auto parameters in C++ | Lesley Lai
Auto parameters generate templates ... In some programming languages such as ML or Rust, the type system can infer the exact type of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
fwiw I’m chipping away at this when I can. Got some stuff working, currently turns
into
Does that all look correct (I’m in a bit of a hurry at the moment, I’ve hardly even looked at the results)? (I notice an extra
;
is sneaking in haha)I think there are a lot of options/decisions/different directions we can go, so I’m just trying to get a minimum useful product up and then we can make all those fun decisions together.
For those who’re interested in
hmDef
concept by @kedashoe: https://github.com/xodio/hm-defIt’s not quite complete regarding complex cases but usable enough for usual scenarios. Works fine on a hundred of functions in our project.