appends any value, creating a new combined sequence

In case given $other is not something iterable it is simply appended as
last element to a new sequence.

This is an intermediate operation.

@param   mixed  $other
@return  \stubbles\sequence\Sequence
772970
public function append($other): self
    {
        if (is_array($this->elements) && !is_array($other) && !($other instanceof \Traversable)) {
            $all = $this->elements;
            $all[] = $other;
            return new self($all);
        }

        $appendIterator = new \AppendIterator();
        $appendIterator->append($this->getIterator());
        $appendIterator->append(castToIterator($other));
        return new self($appendIterator, $this->type);
    }
5146
public function addSegment($segment, $other = null){
		if(!$segment instanceof Segment){
			$segment = new Segment($segment);
		}
		if($this->getIndexOf($segment->getName())) throw new \Exception('Section with this name already exists');
		if($other){
			if(($index = $this->getIndexOf($other))===false) throw new \Exception('Segment not found');
			array_splice($this->segments, $index, 0, [$segment]);
		}else{
			$this->segments[] = $segment;
		}
		return $segment;
	}
1283124
public function greaterThanOrEqual($other)
    {
        $this->doCheck(function ($value) use ($other) {
            $this->throwExceptionIfFalse(
                $value >= $other,
                'Failed assertion that %s is greater than %s', $value, $other
            );
        });

        return $this;
    }
1240962
public function append(array $append = [])
    {
        if (isset($this->option['append'])) {
            $this->option['append'] = array_merge($this->option['append'], $append);
        } else {
            $this->option['append'] = $append;
        }

        return $this;
    }
966446
public function projection(self $other): self
    {
        return self::fromMatrix($other->multiplyScalar($this->dotProduct($other) / ($other->l2norm() ** 2)));
    }
447267
public function asSequence(): Constructed\Sequence
    {
        if (!$this->_element instanceof Constructed\Sequence) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_SEQUENCE));
        }
        return $this->_element;
    }
1080633
public function lt($other)
    {
        if (!($other instanceof self)) {
            $other = new BigInt($other);
        }
        return ($this->compare($other) < 0);
    }
1018838
public static function arrayAppendLast(
        array $array,
        string $last,
        string $others = null
    ) {
        $count = count($array);
        foreach ($array as $key => $value) {
            $array[$key] = $value . (--$count > 0 ? $others : $last);
        }
        return $array;
    }
697867
public function zipLeft($other)
    {
        if (count($other) !== count($this)) {
            throw new \InvalidArgumentException(
                'Both left and right must have same size.'
            );
        }

        if (is_array($other)) {
            return new Seq(
                array_map(
                    function ($a, $b) {
                        return new Tuple([$a, $b]);
                    },
                    $other,
                    $this->data
                )
            );
        }

        if ($other instanceof Seq) {
            return $other->zip($this->data);
        }

        throw new \InvalidArgumentException('`$other` must be `Seq` or `array`');
    }
384721
private function mergePriceData($other)
    {
        if (!isset($other->stats->stats_fields)) {
            return;
        }

        $statsFields = (array)$other->stats->stats_fields;

        foreach($statsFields as $fieldName => $fieldData) {

            if (!isset($this->stats)) {
                $this->stats = new \stdClass();
            }
            if (!isset($this->stats->stats_fields)) {
                $this->stats->stats_fields = new \stdClass();
            }
            if (!isset($this->stats->stats_fields->$fieldName)) {
                $this->stats->stats_fields->$fieldName = new \stdClass();
            }

            $fieldData = (array)$fieldData;
            if (isset($fieldData['min'])) {
                $this->stats->stats_fields->$fieldName->min = $fieldData['min'];
            }
            if (isset($fieldData['max'])) {
                $this->stats->stats_fields->$fieldName->max = $fieldData['max'];
            }
        }
    }
269804
def append(self, other: 'List') -> 'List':
        """"""

        if self.null():
            return other
        return (self.tail().append(other)).cons(self.head())
287303
public function strictEqual($other)
    {
        $this->doCheck(function ($value) use ($other) {
            $this->throwExceptionIfFalse(
                $value === $other,
                'Value "%s" is not the same as "%s"', $value, $other
            );
        });

        return $this;
    }
1198779
public function append($s)
    {
        if ($s instanceof Buffer) {
            $s = $s->buffer;
        }
        $this->buffer .= $s;
        $this->length = strlen($this->buffer);
        return $this;
    }
765786
public function add(Money $other): Money
    {
        $this->guardCurrency($other);

        $amount = $this->amount + $other->amount;

        $this->guardAmountInBounds($amount);

        return $this->withAmount($amount);
    }
314499
public function concat(...$others)
    {
        return static::of(
            Std::foldl(
                function ($carry, $part) {
                    return $carry . (string) $part;
                },
                $this->contents,
                $others
            ),
            $this->encoding
        );
    }
612567
public function equal($other)
    {
        $this->doCheck(function ($value) use ($other) {
            $this->throwExceptionIfFalse(
                $value == $other,
                'Value "%s" is not equal to "%s"', $value, $other
            );
        });

        return $this;
    }
202116
public function equals(self $other) : bool
    {
        if ($other === $this) {
            return true;
        }
        
        return $other->from->equals($this->from) && $other->until->equals($this->until);
    }