add DO LOOP
This commit is contained in:
16
words.go
16
words.go
@@ -7,17 +7,19 @@ type Dictionary map[string]Word
|
||||
|
||||
// A Word defines a subroutine
|
||||
type Word struct {
|
||||
Name string
|
||||
Impl func() error
|
||||
Source []string
|
||||
Name string
|
||||
Impl func() error
|
||||
Source []string
|
||||
Immediate bool
|
||||
}
|
||||
|
||||
// AddWord inserts a new word into the dictonary, optionally overwriting the existing word
|
||||
func (d Dictionary) AddWord(name string, impl func() error, source []string) {
|
||||
func (d Dictionary) AddWord(name string, impl func() error, source []string, immediate bool) {
|
||||
d[name] = Word{
|
||||
Name: name,
|
||||
Impl: impl,
|
||||
Source: source,
|
||||
Name: name,
|
||||
Impl: impl,
|
||||
Source: source,
|
||||
Immediate: immediate,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user