This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@GrabResolver('https://oss.sonatype.org/content/repositories/snapshots/') | |
@Grab('com.github.mperry:functionalgroovy-main:0.5-SNAPSHOT') | |
import groovy.transform.TypeChecked | |
import org.junit.Test | |
import static junit.framework.Assert.assertTrue | |
@TypeChecked | |
class StreamTest { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set VERSION=%1 | |
call setEnvVar JAVA_HOME JAVA%VERSION%_HOME | |
echo JAVA_HOME=%JAVA_HOME% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.mperry; | |
import org.junit.Test; | |
import java.util.function.Function; | |
import static org.junit.Assert.assertTrue; | |
/** | |
* Created by MarkPerry on 3/04/2014. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Haskell definitions: | |
unfoldr :: (b -> Maybe (a, b)) -> b -> [a] | |
foldr :: (a -> b -> b) -> b -> [a] -> b | |
If I reverse the arrows on unfoldr | |
dual(unfoldr) :: [a] -> (Maybe (a, b) -> b) -> b | |
I think I need to show the type isomorphism (a -> b -> b) -> b is equivalent to Maybe (a, b) -> b, which is equivalent to | |
(a -> b -> b) == Maybe(a, b) |
NewerOlder