avatar
java 8 也可以fp啊# Programming - 葵花宝典
C*S
1
Occasionally I received emails from graduate students in China telling me
that they are preparing applications for China Research Council fund to
support their short-term study aboard as a visiting student. They asked me
to issue an official invitation letter so that they will include the letter
in their applications to China Research Council.
I sense that at least some of people send similar emails to a huge number of
professors asking for the same invitation letter and then pick one that is
most promising.
So you guys have any suggestions about how I should respond to this type of
quasi-spam inquiry? Should I simply ignore it or should I contact these
students to find out whether they are really interested in working with me?
How?
Thanks.
avatar
l*n
2
package java8tests ;
import java.util.function.BiFunction ;
import java.util.function.Function ;
public class Currying {
public void currying() {
// Create a function that adds 2 integers
BiFunction adder = ( a, b ) -> a + b ;
// And a function that takes an integer and returns a function
Function> currier = a -> b ->
adder.apply( a, b ) ;
// Call apply 4 to currier (to get a function back)
Function curried = currier.apply( 4 ) ;

// Results
System.out.printf( "Curry : %dn", curried.apply( 3 ) ) ; // ( 4 + 3 )
}
public void composition() {
// A function that adds 3
Function add3 = (a) -> a + 3 ;

// And a function that multiplies by 2
Function times2 = (a) -> a * 2 ;

// Compose add with times
Function composedA = add3.compose( times2 ) ;

// And compose times with add
Function composedB = times2.compose( add3 ) ;

// Results
System.out.printf( "Times then add: %dn", composedA.apply( 6 ) ) ;
// ( 6 * 2 ) + 3
System.out.printf( "Add then times: %dn", composedB.apply( 6 ) ) ;
// ( 6 + 3 ) * 2
}

public static void main( String[] args ) {
new Currying().currying() ;
new Currying().composition() ;
}
}
avatar
a*u
3
What I would do is, if the email does not contain specific information about
me (the recipient) to show the writer has done some research on my research
projects, then I will treat it as a scam.
avatar
p*2
4
还不够噁心的
avatar
f*g
5
就选好的吧,反正自己不需要花钱养他们。

letter
of
is
of

【在 C*S 的大作中提到】
: Occasionally I received emails from graduate students in China telling me
: that they are preparing applications for China Research Council fund to
: support their short-term study aboard as a visiting student. They asked me
: to issue an official invitation letter so that they will include the letter
: in their applications to China Research Council.
: I sense that at least some of people send similar emails to a huge number of
: professors asking for the same invitation letter and then pick one that is
: most promising.
: So you guys have any suggestions about how I should respond to this type of
: quasi-spam inquiry? Should I simply ignore it or should I contact these

avatar
N*m
6
这个比scala还差

【在 p*****2 的大作中提到】
: 还不够噁心的
avatar
k*5
7
奸商一样的丑陋

【在 f******g 的大作中提到】
: 就选好的吧,反正自己不需要花钱养他们。
:
: letter
: of
: is
: of

avatar
l*n
8
scala的type很复杂。

【在 N*****m 的大作中提到】
: 这个比scala还差
avatar
b*s
9
java is too difficult to hug new things
avatar
b*e
10
JVM was designed a long time ago and some of the design choices were made in
restricted ways such that some certain modern features are difficult to
extend. It's a dilemma given that Java needs to maintain its backward
compatibility. To this point, Java's doing much better than Ruby or Python,
which are not always backward compatible.

【在 b*******s 的大作中提到】
: java is too difficult to hug new things
avatar
b*s
11
Java主要是做企业应用的,不后向兼容是不可接受的

in
Python,

【在 b***e 的大作中提到】
: JVM was designed a long time ago and some of the design choices were made in
: restricted ways such that some certain modern features are difficult to
: extend. It's a dilemma given that Java needs to maintain its backward
: compatibility. To this point, Java's doing much better than Ruby or Python,
: which are not always backward compatible.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。