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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package clinuxrulz.gmail.rxtest; | |
import clinuxrulz.gmail.rxtest.inc_arrow.IncArrowArrow; | |
import clinuxrulz.gmail.rxtest.inc_arrow.IncArrowStatefulArrowTransformer; | |
import clinuxrulz.gmail.rxtest.inc_arrow.IncArrowCategory; |
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
resume <- callCC (\bail -> do | |
let suspend = callCC (\k -> bail $ k unit) | |
suspend | |
return (return unit) | |
) | |
resume |
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
newtype SuspContT r m a = SuspContT ((a -> m (Either (Unit -> SuspContT r m a) r)) -> m (Either (Unit -> SuspContT r m a) r)) | |
runSuspContT :: forall r m a. (MonadRec m) => SuspContT r m a -> (a -> m r) -> m r | |
runSuspContT s f = tailRecM go s | |
where | |
go :: SuspContT r m a -> m (Either (SuspContT r m a) r) | |
go (SuspContT c) = do | |
( | |
either | |
(\thunk -> Left $ thunk unit) |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package com.sm.fp.data.trans.rws; | |
import com.sm.fp.data.trans.RWST; | |
import com.sm.fp.kinds.T_; | |
import com.sm.fp.kinds.T__; |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package gmail.clinuxrulz.derive4j.test.stream; | |
/** | |
* | |
* @author clintonselke |
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.sm.fp.data.trans; | |
import com.sm.fp.data.trans.generator.*; | |
import com.sm.fp.kinds.__; | |
import com.sm.fp.kinds.__3; | |
import com.sm.fp.typeclass1.monad.Identity; | |
import com.sm.fp.typeclass1.monad.Monad; | |
import com.sm.fp.typeclass1.monad.MonadRec; | |
import fj.*; | |
import fj.data.Either; |
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.sm.fp.data.eq.type; | |
import com.sm.fp.kinds.__; | |
class Coerce<A> implements __<Coerce.Mu,A> { | |
public static class Mu {} | |
private final A value; | |
private Coerce(A value) { |
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
{-# LANGUAGE RankNTypes, KindSignatures, MultiParamTypeClasses, FlexibleContexts #-} | |
newtype Free f a = Free (forall m. (Monad m) => f m -> m a) | |
runFree :: (Monad m) => forall f a. Free f a -> f m -> m a | |
runFree (Free k) = k | |
instance Functor (Free f) where | |
fmap f (Free k) = Free (\impl -> fmap f (k impl)) |
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
@SuppressWarnings("RedundantTypeArguments") | |
public static final GuiDSL<GableSoffitParams> gui = GuiDSL.p5( | |
GuiDSL.<Double, Double, Double, Double, Double>p5( | |
GuiDSL.labeled("length", GuiDSL.double_()), | |
GuiDSL.labeled("span", GuiDSL.double_()), | |
GuiDSL.labeled("height", GuiDSL.double_()), | |
GuiDSL.labeled("pitch", GuiDSL.double_()), | |
GuiDSL.labeled("side1Overhang", GuiDSL.double_()) | |
), | |
GuiDSL.<Double, Double, Double, Double, Double>p5( |
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.sm.fp.data.typeable; | |
import com.sm.fp.DataSinkEffects2; | |
import com.sm.fp.DataSourceEffects2; | |
import com.sm.fp.LoadSave3; | |
import com.sm.fp.data.eq.type.Leibniz; | |
import com.sm.fp.kinds.__; | |
import fj.*; | |
import fj.data.Either; | |
import fj.data.List; |
OlderNewer