Search results

Jump to navigation Jump to search
  • newtype MonadTransformer t m a = MonadTransformer (t m a) * <hask>m :: * -> *</hask>,
    1 KB (192 words) - 23:01, 5 April 2021
  • newtype NondetT m a = NondetT { mkNondetT :: (forall b. (a -> m b -> m b) -> m b -> m b) }
    1 KB (223 words) - 07:25, 15 June 2022
  • newtype ListT m a = ListT { runListT :: m (Maybe (a, ListT m a)) } foldListT :: Monad m => (a -> m b -> m b) -> m b -> ListT m a -> m b
    2 KB (402 words) - 06:31, 12 May 2015
  • parent :: MonadPlus m => Sheep -> m Sheep grandparent :: MonadPlus m => Sheep -> m Sheep
    1 KB (151 words) - 08:45, 9 April 2021
  • mother ms >>= \m -> father m
    1 KB (147 words) - 08:41, 9 April 2021
  • (**) Calculate Euler's totient function phi(m) (improved). totient m = product [(p - 1) * p ^ (c - 1) | (p, c) <- prime_factors_mult m]
    373 bytes (58 words) - 19:46, 18 January 2014
  • newtype SupplyT s m a = SupplyT (StateT [s] m a) class Monad m => MonadSupply s m | m -> s where
    1 KB (202 words) - 05:09, 4 April 2014
  • Lotto: Draw N different random numbers from the set 1..M. diffSelect n m = do
    2 KB (244 words) - 00:09, 7 April 2019
  • ETAGS allows jumping to the definition of names at the point via <code>M-.</code>. To generate tags (a TAGS file) for a project, you need [http://h Run <code>M-x haskell-process-generate-tags</code> to generate the TAGS file of the [[S
    1 KB (170 words) - 18:23, 11 April 2016
  • mother ms >>= \m -> father m
    4 KB (454 words) - 02:33, 7 January 2022
  • class (Monad m) => MonadPlus m where mzero :: m a
    2 KB (240 words) - 22:55, 5 April 2021
  • class Monad m => MonadExit e m | m -> e where exitWith :: e -> m a
    4 KB (707 words) - 09:43, 9 December 2014
  • class Monad m => VarMonad m v where new :: a -> m (v a)
    1 KB (198 words) - 22:52, 21 July 2021
  • type M p a = p -> a unit :: Partible p => a -> M p a
    4 KB (691 words) - 08:14, 12 June 2023
  • instance (Applicative m) => Applicative (ReaderT r m) where ... instance (Alternative m) => Alternative (ReaderT r m) where ...
    3 KB (378 words) - 15:19, 6 February 2021
  • class Functor m => Monad m where return :: alpha -> m alpha
    3 KB (547 words) - 07:53, 16 April 2019
  • goldbachList n m = map goldbach $ dropWhile (<4) $ filter even [n..m] goldbachList' n m i = filter (\(x,y) -> x > i && y > i) $ goldbachList n m
    992 bytes (161 words) - 19:48, 18 January 2014
  • $ ./a.out "%a %b %e %H:%M:%S %Z %Y" $ ./a.out "%y-%m-%d"
    543 bytes (78 words) - 15:19, 6 February 2021
  • range n m | n == m = [n]
    1 KB (214 words) - 02:08, 5 April 2014
  • import Data.Map as M (fromList,union, Map()) keys = \c -> myKeys c `M.union` keys def c
    6 KB (615 words) - 23:47, 28 November 2018

View (previous 20 | next 20) (20 | 50 | 100 | 250 | 500)