diff --git a/src/cmd/ll/main.go b/cmd/ll/main.go similarity index 61% rename from src/cmd/ll/main.go rename to cmd/ll/main.go index ebaa7f8..198db3e 100644 --- a/src/cmd/ll/main.go +++ b/cmd/ll/main.go @@ -1,19 +1,14 @@ package main import ( - "github.com/mojosa-software/godat/src/llx" - "fmt" + "github.com/mojosa-software/godat/llx" ) func main() { ll := llx.New[string]("zero", "one", "two", "three", "four", "five") - + ll.Push("-one", "-two") + ll.Swap(0, 2) - - for el := range ll.Chan() { - fmt.Println(el) - } fmt.Println(ll.Slice()) } - diff --git a/src/iterx/chan.go b/iterx/chan.go similarity index 100% rename from src/iterx/chan.go rename to iterx/chan.go diff --git a/src/iterx/iter.go b/iterx/iter.go similarity index 85% rename from src/iterx/iter.go rename to iterx/iter.go index 22acec7..53ddbc7 100644 --- a/src/iterx/iter.go +++ b/iterx/iter.go @@ -2,8 +2,8 @@ package iterx // Implementing the interface lets us iterate through the // the data by lightweight channels. -type Channeler[K any, V any] interface { - Chan() PairChan[K, V] +type Channeler[V any] interface { + Chan() chan V } // Implementing the interface provides the way to diff --git a/src/iterx/misc.go b/iterx/misc.go similarity index 100% rename from src/iterx/misc.go rename to iterx/misc.go diff --git a/src/llx/main.go b/llx/main.go similarity index 100% rename from src/llx/main.go rename to llx/main.go diff --git a/src/mapx/main.go b/mapx/main.go similarity index 100% rename from src/mapx/main.go rename to mapx/main.go diff --git a/src/mapx/misc.go b/mapx/misc.go similarity index 100% rename from src/mapx/misc.go rename to mapx/misc.go diff --git a/src/mapx/ordered.go b/mapx/ordered.go similarity index 100% rename from src/mapx/ordered.go rename to mapx/ordered.go diff --git a/src/mapx/uniq.go b/mapx/uniq.go similarity index 100% rename from src/mapx/uniq.go rename to mapx/uniq.go diff --git a/mkfile b/mkfile index c5540db..5911453 100644 --- a/mkfile +++ b/mkfile @@ -1,5 +1,7 @@ -