moved all math functions and operators to funcalls

So now if you want to add a new operator or math function all you have
to do is to add it to func.go. Conpletion will be generated from it.
This commit is contained in:
2023-11-05 12:55:59 +01:00
parent 5189d351c6
commit c4c60651d1
4 changed files with 243 additions and 235 deletions

10
util.go
View File

@@ -17,7 +17,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package main
import "math"
import (
"fmt"
"math"
"strings"
)
// find an item in a list
func contains(s []string, e string) bool {
@@ -55,3 +59,7 @@ func const2num(name string) float64 {
return 0
}
}
func list2str(list Numbers) string {
return strings.Trim(strings.Join(strings.Fields(fmt.Sprint(list)), " "), "[]")
}