-
Notifications
You must be signed in to change notification settings - Fork 0
/
Identity.phpstub
63 lines (54 loc) · 1.13 KB
/
Identity.phpstub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
namespace FunctionalPHP\FantasyLand\Useful;
use FunctionalPHP\FantasyLand;
use FunctionalPHP\FantasyLand\Functor;
/**
* @template T
* @template-implements FantasyLand\Monad<T>
*/
class Identity implements FantasyLand\Monad
{
const of = 'FunctionalPHP\FantasyLand\Useful\Identity::of';
/**
* @var T
*/
private $value;
/**
* @template U
* @param U $value
* @return Identity<U>
*/
public static function of($value)
{
}
/**
* @param T $value
*/
private function __construct($value)
{
}
/**
* @template F
* @param callable(T): F $function
* @return Identity<F>
*/
public function map(callable $function): FantasyLand\Functor
{
}
/**
* @template U
* @param FantasyLand\Apply<U> $applicative
* @return (T is callable ? Identity<U> : never-return)
*/
public function ap(FantasyLand\Apply $applicative): FantasyLand\Apply
{
}
/**
* @template U of Chain
* @param callable(T): U $function
* @return U
*/
public function bind(callable $transformation)
{
}
}