Skip to content

kewne/functional-extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Functional extensions

A Java experiment gone wrong.

I started this due to the recurring annoyance that is only being able to compose expressions with lambdas and method references when said lambdas and method references are at the start of the expression.

For example, the following are impossible (yes, I am aware that composing these particular methods is smelly):

(String::trim).andThen(String::toUpperCase);

(s -> s.trim()).andThen(s -> s.toUpperCase());

My initial idea for this repo was to use wrapping methods to get around it:

// Static imports used
wf(String::trim).andThen(String::toUpperCase);

wf(s -> s.trim()).andThen(s -> s.toUpperCase());

but, as it turns out, the code above does not compile because the compiler infers the types as being Object and then complains it cannot find the methods.

About

A bunch of utilities that might make lambdas simpler to use.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages