repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks:
[mcs.git]
/
tests
/
gtest-161.cs
blob
6f119fa124f015020a8f6072c8b917b2f870f712
1
// Compiler options: -r:gtest-161-lib.dll
2
3
public class
App
4
{
5
public static void
Main
()
6
{
7
string
s
=
apply
<
int
,
string
> (
3
,
delegate
(
int
x
) {
8
return
x
.
ToString
();
9
});
10
11
int
y
=
apply
<
int
,
int
> (
3
,
FP
.
identity
<
int
>);
12
}
13
14
static
U apply
<
T
,
U
> (
T obj
,
FP
.
Mapping
<
T
,
U
>
f
)
15
{
16
return
f
(
obj
);
17
}
18
}