You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -25,15 +25,6 @@ Paguro lets you forget about:
25
25
26
26
Kotlin fixes almost all these issues too, but if you're stuck in Java, Paguro is a great solution.
27
27
28
-
# What's the Best/Most-Used Part?
29
-
- The stuff in StaticImports:
30
-
-`vec()`
31
-
-`map(tup(x, y), tup(a, b))`
32
-
-`xform()` and `xformArray()`
33
-
- The functional interfaces: `Fn0`, `Fn1`, `Fn2`, `Fn3` because they wrap checked exceptions.
34
-
- Because Java doesn't have sealed classes, I often write a lot of match() methods like those on the oneOf classes. I probably copy the match() methods as often as I use most of the OneOf# classes. It's a great way to say, "Make sure you code for each of these cases every time you use this kind of thing."
35
-
-`LazyRef`
36
-
37
28
# What's in Paguro?
38
29
Type-safe, null-safe versions of Clojure's immutable/persistent collections, an immutable alternative to Java 8 Streams that handles checked exceptions in lambdas, and other tools to make functional programming in Java easier.
39
30
@@ -60,6 +51,15 @@ Paguro is short for the Latin "Paguroidea" - the name of the Hermit Crab superfa
60
51
61
52
[Usage examples](src/test/java/org/organicdesign/fp/UsageExampleTest.java) are implemented as unit tests to ensure that they remain correct and current.
62
53
54
+
# What's the Most-Practical/Most-Used Part?
55
+
- The stuff in StaticImports:
56
+
-`vec()`
57
+
-`map(tup(x, y), tup(a, b))`
58
+
-`xform()` and `xformArray()`
59
+
- The functional interfaces: `Fn0`, `Fn1`, `Fn2`, `Fn3` because they wrap checked exceptions.
60
+
- Because Java doesn't have sealed classes, I often write a lot of match() methods like those on the oneOf classes. I probably copy the match() methods as often as I use most of the OneOf# classes. It's a great way to say, "Make sure you code for each of these cases every time you use this kind of thing."
61
+
-`LazyRef`
62
+
-`Tuple2` implements `Map.Entry<K,V>` which means I use the Map.Entry interface a lot more than I would otherwise (compare with `Pair<A,B>` in Kotlin). Paguro lets you convert to and from maps easily, so this interface becomes super handy. `Iterable<Map.Entry<K,V>>` becomes a pretty common input type.
63
63
64
64
# Getting Started
65
65
@@ -71,7 +71,7 @@ Paguro is short for the Latin "Paguroidea" - the name of the Hermit Crab superfa
71
71
# Classic
72
72
You are on the Paguro Classic, or main branch of this project.
73
73
If you work with pure Java, or a mix of Java and Kotlin files, this is your branch.
74
-
If you want to live dangerously, try the all-Kotlin version in the 4.0 branch when it becomes available.
74
+
I'm not sure the pure-Kotlin branch will ever be released. Plain Java with `@NotNull` annotations gets you most of the way there, with almost no dependencies.
0 commit comments