Extension:WikiLambda/Creating Objects
Create a function[edit]
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.
- Go to the
Special:CreateZObject
function creation page. - Name your function.
- Define your function's inputs:
- Define your function output type.
- Optionally, provide multilingual options for any of these fields:
- Publish your function.
Create a test[edit]
To create tests for your function implementations to ensure they are working properly, follow these steps:
- Find a function on your wiki, or the function you created in the previous workflow.
- Navigate to the function page and click the "Details" tab.
- Click the “Create a new test” link.
- Click on "Select Function" under "Call".
- 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.
- Publish your updates.
Create an implementation[edit]
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:
- Find a function on your wiki.
- Navigate to the function page and click the Details tab.
- Click the “Create a new implementation” link
- You can create a new implementation in one of two ways:
- Publish your updates (after running a test by clicking the round arrow on the right of the box titled Test Cases).