codethesaur.us icon indicating copy to clipboard operation
codethesaur.us copied to clipboard

Anonymous functions in meta language should add return types

Open geekygirlsarah opened this issue 3 years ago • 7 comments

Description

In the Functions meta language, there's descriptions of a variety of functions and how they take in parameters and how they return things.

There's a few descriptions for anonymous functions. They have some descriptions of how to take parameters but not how to have return types (or lack thereof). This issue is to add in those concepts.

See: https://codethesaur.us/reference/?concept=functions&lang=python (below)

image

Requirements

  1. Review the file web/thesauruses/_meta/functions.json
  2. Add in additional concept IDs at the top for these
  3. Add in the empty key/value sections at the bottom of the file (in order)
  4. Provide an accurate description, and add a code section, but leave it blank
  5. PR it!

For this PR, do not implement these in any other languages, just add the "meta" language.

geekygirlsarah avatar May 14 '21 00:05 geekygirlsarah

Hey can you explain this issue? Maybe I could help

pranatimittal avatar Oct 03 '21 17:10 pranatimittal

@pranatimittal Good point, this was written pretty badly. I think I threw it in real quick as a reminder to myself but didn't ever really elaborate on it more.

I revised the description along with screenshots and requirements. Hopefully this helps!

Let me know if you want to work on it.

geekygirlsarah avatar Oct 04 '21 22:10 geekygirlsarah

@geekygirlsarah Thanks for the details. I kind of understand what is happening but aren't anonymous and return type functions already separated in categories? and what is meant by concept ID

pranatimittal avatar Oct 05 '21 16:10 pranatimittal

So in the file, the top part is like:

 "categories": {
    "Void Functions": [
      "void_function_no_parameters",
      "void_function_with_parameters",
      "void_function_variable_parameters"
    ],

So I'm calling things like void_function_no_parameters a concept ID. Later in the file, those are defined:

    "void_function_no_parameters": {
      "name": "Function that does not return a value and takes no parameters",
      "code": ""
    },

So there's ones for anonymous functions (anonymous_function_no_parameters, anonymous_function_with_parameters, anonymous_function_variable_parameters) but they all are written based on parameters, and don't account for any type of return values (or lack of return values). So this is to add more concept IDs and definitions to add those.

geekygirlsarah avatar Oct 05 '21 19:10 geekygirlsarah

"anonymous_function_with_return_no_parameters" "anonymous_function_without_return_no_parameters" Something like this?

pranatimittal avatar Oct 06 '21 16:10 pranatimittal

Yeah, something like that works

geekygirlsarah avatar Oct 08 '21 00:10 geekygirlsarah

@pranatimittal You had commented on this issue previous. Were you wanting to work on it? Did you already work on it? Were you just asking questions? I just wanted to figure out the status. Thanks!

geekygirlsarah avatar Feb 06 '22 17:02 geekygirlsarah

@geekygirlsarah happy to take this on if it's still needed 🙂

aedwardg avatar Oct 12 '22 05:10 aedwardg

Hey @aedwardg, yeah you can have it!

Please look over the docs and let me know if you have any questions!

geekygirlsarah avatar Oct 12 '22 13:10 geekygirlsarah