lang: funcs: Add math pow function and a few examples

Just a few small things I think should be committed.
This commit is contained in:
James Shubin
2018-02-25 19:09:21 -05:00
parent 6370f0cb95
commit df1e50e599
8 changed files with 98 additions and 29 deletions

View File

@@ -291,7 +291,7 @@ If you'd like to create a built-in, core function, you'll need to implement the
function API interface named `Func`. It can be found in
[lang/interfaces/func.go](https://github.com/purpleidea/mgmt/tree/master/lang/interfaces/func.go).
Your function must have a specific type. For example, a simple math function
might have a signature of `func(x int, x int) int`. As you can see, all the
might have a signature of `func(x int, y int) int`. As you can see, all the
types are known _before_ compile time.
A separate discussion on this matter can be found in the [function guide](function-guide.md).