Extension:WikiLambda/Creating Objects

Create a function
To create a new function for use in your own implementations and enable others to use it as well, follow these steps. New functions can be written in your preferred natural language.


 * 1) Go to the   function creation page. Wikifunctions_create_a_new_function_page_01.jpg
 * 2) Name your function. Wikifunctions_create_a_new_function_page_with_name_filled_in.jpg
 * 3) Define your function's inputs:
 * 4) Add/remove input fields.
 * 5) Define each input type.
 * 6) Name each input. Wikifunctions_create_a_new_function_page_with_input_type_and_label_filled_in.jpg
 * 7) Define your function output type. Wikifunctions_create_a_new_function_page_with_output_type_filled_in.jpg
 * 8) Optionally, provide multilingual options for any of these fields:
 * 9) * Function name, function aliases, input labels. Wikifunctions_create_a_new_function_page_with_labels_in_another_language.jpg
 * 10) Publish your function. Wikifunctions_create_a_new_function_page_publish_button.jpg

Create a test
To create tests for your function implementations to ensure they are working properly, follow these steps:


 * 1) Find a function on your wiki, or the function you created in the previous workflow. Wikifunctions_main_page.jpg
 * 2) Navigate to the function page and click the "Details" tab. Function_that_converts_a_roman_numeral_to_its_decimal_form.jpg
 * 3) Click the “Create a new test” link. Details_view_of_a_function_that_turns_a_roman_numeral_into_its_decimal_form.jpg
 * 4) Click on "Select Function" under "Call".
 * 5) In the field under "Function", type in the name of the function you are testing and select the function when it shows up.
 * 6) Add values for the inputs in the respective fields. Add_call_to_function_test_on_Wikifunctions.jpg
 * 7) Click on "Select Function" under "Result Validation". In the field under "Function", type in the name of the function you want to use to check the result.
 * 8) * For a function whose output is String, this will be "String equality", for a function whose output is Boolean, this will be "Boolean equality".
 * 9) * Add the expected value in the given field (either "Second String" or "Second Boolean"). Create_a_new_test_on_Wikifunctions.jpg
 * 10) Publish your updates. Publish_a_new_test_on_Wikifunctions.jpg

Create an implementation
Functions are brought to life in implementations created to suit your needs. Run, remix, and combine functions via implementations. We recommend creating and connecting a test before creating an implementation. To create an implementation, follow these steps:


 * 1) Find a function on your wiki. Wikifunctions_main_page.jpg
 * 2) Navigate to the function page and click the Details tab. Function_that_converts_a_roman_numeral_to_its_decimal_form.jpg
 * 3) Click the “Create a new implementation” link Function_details_tab_on_Wikifunctions.jpg
 * 4) You can create a new implementation in one of two ways:
 * 5) Code
 * 6) * Select the required programming language to write the function code.
 * 7) * Input your code.
 * 8) Composition:
 * 9) * Create a composition using existing functions. Create_a_new_implementation_on_Wikifunctions.jpg
 * 10) Publish your updates (after running a test by clicking the round arrow on the right of the box titled Test Cases). Publishing_a_function_implementation_on_Wikifunctions.jpg