package fp

func (q BoolQueue) TakeWhile(p func(bool) bool) BoolQueue {
	acc := NilBoolQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q StringQueue) TakeWhile(p func(string) bool) StringQueue {
	acc := NilStringQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q IntQueue) TakeWhile(p func(int) bool) IntQueue {
	acc := NilIntQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Int64Queue) TakeWhile(p func(int64) bool) Int64Queue {
	acc := NilInt64Queue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q ByteQueue) TakeWhile(p func(byte) bool) ByteQueue {
	acc := NilByteQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q RuneQueue) TakeWhile(p func(rune) bool) RuneQueue {
	acc := NilRuneQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float32Queue) TakeWhile(p func(float32) bool) Float32Queue {
	acc := NilFloat32Queue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float64Queue) TakeWhile(p func(float64) bool) Float64Queue {
	acc := NilFloat64Queue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q AnyQueue) TakeWhile(p func(Any) bool) AnyQueue {
	acc := NilAnyQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Tuple2Queue) TakeWhile(p func(Tuple2) bool) Tuple2Queue {
	acc := NilTuple2Queue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q BoolArrayQueue) TakeWhile(p func([]bool) bool) BoolArrayQueue {
	acc := NilBoolArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q StringArrayQueue) TakeWhile(p func([]string) bool) StringArrayQueue {
	acc := NilStringArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q IntArrayQueue) TakeWhile(p func([]int) bool) IntArrayQueue {
	acc := NilIntArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Int64ArrayQueue) TakeWhile(p func([]int64) bool) Int64ArrayQueue {
	acc := NilInt64ArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q ByteArrayQueue) TakeWhile(p func([]byte) bool) ByteArrayQueue {
	acc := NilByteArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q RuneArrayQueue) TakeWhile(p func([]rune) bool) RuneArrayQueue {
	acc := NilRuneArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float32ArrayQueue) TakeWhile(p func([]float32) bool) Float32ArrayQueue {
	acc := NilFloat32ArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float64ArrayQueue) TakeWhile(p func([]float64) bool) Float64ArrayQueue {
	acc := NilFloat64ArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q AnyArrayQueue) TakeWhile(p func([]Any) bool) AnyArrayQueue {
	acc := NilAnyArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Tuple2ArrayQueue) TakeWhile(p func([]Tuple2) bool) Tuple2ArrayQueue {
	acc := NilTuple2ArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q BoolOptionQueue) TakeWhile(p func(BoolOption) bool) BoolOptionQueue {
	acc := NilBoolOptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q StringOptionQueue) TakeWhile(p func(StringOption) bool) StringOptionQueue {
	acc := NilStringOptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q IntOptionQueue) TakeWhile(p func(IntOption) bool) IntOptionQueue {
	acc := NilIntOptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Int64OptionQueue) TakeWhile(p func(Int64Option) bool) Int64OptionQueue {
	acc := NilInt64OptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q ByteOptionQueue) TakeWhile(p func(ByteOption) bool) ByteOptionQueue {
	acc := NilByteOptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q RuneOptionQueue) TakeWhile(p func(RuneOption) bool) RuneOptionQueue {
	acc := NilRuneOptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float32OptionQueue) TakeWhile(p func(Float32Option) bool) Float32OptionQueue {
	acc := NilFloat32OptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float64OptionQueue) TakeWhile(p func(Float64Option) bool) Float64OptionQueue {
	acc := NilFloat64OptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q AnyOptionQueue) TakeWhile(p func(AnyOption) bool) AnyOptionQueue {
	acc := NilAnyOptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Tuple2OptionQueue) TakeWhile(p func(Tuple2Option) bool) Tuple2OptionQueue {
	acc := NilTuple2OptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q BoolListQueue) TakeWhile(p func(BoolList) bool) BoolListQueue {
	acc := NilBoolListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q StringListQueue) TakeWhile(p func(StringList) bool) StringListQueue {
	acc := NilStringListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q IntListQueue) TakeWhile(p func(IntList) bool) IntListQueue {
	acc := NilIntListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Int64ListQueue) TakeWhile(p func(Int64List) bool) Int64ListQueue {
	acc := NilInt64ListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q ByteListQueue) TakeWhile(p func(ByteList) bool) ByteListQueue {
	acc := NilByteListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q RuneListQueue) TakeWhile(p func(RuneList) bool) RuneListQueue {
	acc := NilRuneListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float32ListQueue) TakeWhile(p func(Float32List) bool) Float32ListQueue {
	acc := NilFloat32ListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float64ListQueue) TakeWhile(p func(Float64List) bool) Float64ListQueue {
	acc := NilFloat64ListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q AnyListQueue) TakeWhile(p func(AnyList) bool) AnyListQueue {
	acc := NilAnyListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Tuple2ListQueue) TakeWhile(p func(Tuple2List) bool) Tuple2ListQueue {
	acc := NilTuple2ListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
// bootstrap_queue_takewhile.go
// DO NOT EDIT THIS FILE WAS GENERATED AUTOMATICALLY BY https://github.com/zx80live/gofp-bootstrap

package fp

func (q BoolQueue) TakeWhile(p func(bool) bool) BoolQueue {
	acc := NilBoolQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q StringQueue) TakeWhile(p func(string) bool) StringQueue {
	acc := NilStringQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q IntQueue) TakeWhile(p func(int) bool) IntQueue {
	acc := NilIntQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Int64Queue) TakeWhile(p func(int64) bool) Int64Queue {
	acc := NilInt64Queue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q ByteQueue) TakeWhile(p func(byte) bool) ByteQueue {
	acc := NilByteQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q RuneQueue) TakeWhile(p func(rune) bool) RuneQueue {
	acc := NilRuneQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float32Queue) TakeWhile(p func(float32) bool) Float32Queue {
	acc := NilFloat32Queue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float64Queue) TakeWhile(p func(float64) bool) Float64Queue {
	acc := NilFloat64Queue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q AnyQueue) TakeWhile(p func(Any) bool) AnyQueue {
	acc := NilAnyQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Tuple2Queue) TakeWhile(p func(Tuple2) bool) Tuple2Queue {
	acc := NilTuple2Queue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q BoolArrayQueue) TakeWhile(p func([]bool) bool) BoolArrayQueue {
	acc := NilBoolArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q StringArrayQueue) TakeWhile(p func([]string) bool) StringArrayQueue {
	acc := NilStringArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q IntArrayQueue) TakeWhile(p func([]int) bool) IntArrayQueue {
	acc := NilIntArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Int64ArrayQueue) TakeWhile(p func([]int64) bool) Int64ArrayQueue {
	acc := NilInt64ArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q ByteArrayQueue) TakeWhile(p func([]byte) bool) ByteArrayQueue {
	acc := NilByteArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q RuneArrayQueue) TakeWhile(p func([]rune) bool) RuneArrayQueue {
	acc := NilRuneArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float32ArrayQueue) TakeWhile(p func([]float32) bool) Float32ArrayQueue {
	acc := NilFloat32ArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float64ArrayQueue) TakeWhile(p func([]float64) bool) Float64ArrayQueue {
	acc := NilFloat64ArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q AnyArrayQueue) TakeWhile(p func([]Any) bool) AnyArrayQueue {
	acc := NilAnyArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Tuple2ArrayQueue) TakeWhile(p func([]Tuple2) bool) Tuple2ArrayQueue {
	acc := NilTuple2ArrayQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q BoolOptionQueue) TakeWhile(p func(BoolOption) bool) BoolOptionQueue {
	acc := NilBoolOptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q StringOptionQueue) TakeWhile(p func(StringOption) bool) StringOptionQueue {
	acc := NilStringOptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q IntOptionQueue) TakeWhile(p func(IntOption) bool) IntOptionQueue {
	acc := NilIntOptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Int64OptionQueue) TakeWhile(p func(Int64Option) bool) Int64OptionQueue {
	acc := NilInt64OptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q ByteOptionQueue) TakeWhile(p func(ByteOption) bool) ByteOptionQueue {
	acc := NilByteOptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q RuneOptionQueue) TakeWhile(p func(RuneOption) bool) RuneOptionQueue {
	acc := NilRuneOptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float32OptionQueue) TakeWhile(p func(Float32Option) bool) Float32OptionQueue {
	acc := NilFloat32OptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float64OptionQueue) TakeWhile(p func(Float64Option) bool) Float64OptionQueue {
	acc := NilFloat64OptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q AnyOptionQueue) TakeWhile(p func(AnyOption) bool) AnyOptionQueue {
	acc := NilAnyOptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Tuple2OptionQueue) TakeWhile(p func(Tuple2Option) bool) Tuple2OptionQueue {
	acc := NilTuple2OptionQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q BoolListQueue) TakeWhile(p func(BoolList) bool) BoolListQueue {
	acc := NilBoolListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q StringListQueue) TakeWhile(p func(StringList) bool) StringListQueue {
	acc := NilStringListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q IntListQueue) TakeWhile(p func(IntList) bool) IntListQueue {
	acc := NilIntListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Int64ListQueue) TakeWhile(p func(Int64List) bool) Int64ListQueue {
	acc := NilInt64ListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q ByteListQueue) TakeWhile(p func(ByteList) bool) ByteListQueue {
	acc := NilByteListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q RuneListQueue) TakeWhile(p func(RuneList) bool) RuneListQueue {
	acc := NilRuneListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float32ListQueue) TakeWhile(p func(Float32List) bool) Float32ListQueue {
	acc := NilFloat32ListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Float64ListQueue) TakeWhile(p func(Float64List) bool) Float64ListQueue {
	acc := NilFloat64ListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q AnyListQueue) TakeWhile(p func(AnyList) bool) AnyListQueue {
	acc := NilAnyListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
func (q Tuple2ListQueue) TakeWhile(p func(Tuple2List) bool) Tuple2ListQueue {
	acc := NilTuple2ListQueue
	if q.IsEmpty() {
		return acc
	}
	xs := q
	for {
		h, t := xs.Dequeue()
		if p(h) && t.NonEmpty() {
			acc = acc.Enqueue(h)
			xs = t
		} else {
			break
		}
	}
	return acc
}
