/** * @inheritdoc */ public function bind(callable $transformation) { // xs >>= f = concat (map f xs) return self::of(f\concat(f\map($transformation, $this))); }
/** * @dataProvider provideData */ public function test_it_should_concat_values_to_array($value, $expected) { $this->assertEquals($expected, f\concat($value)); }