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
  • class Monad m => MonadZero m where mzero :: m a
    4 KB (609 words) - 18:22, 23 June 2015
  • data T m a = Cons { write :: a -> m (), read :: m a } modify :: Monad m => T m a -> (a -> a) -> m ()
    2 KB (338 words) - 20:04, 13 May 2020
  • class (Monad m) => MonadRandom m where getRandom :: (Random a) => m a
    6 KB (894 words) - 13:41, 2 April 2019
  • * ''Could not deduce (Functor m) from the context (Monad m)<br/>arising from a use of fmap'' * ''Could not deduce (Functor m) from the context (Monad m)<br/>arising from the superclasses of an instance declaration''
    2 KB (374 words) - 00:43, 9 April 2021
  • newtype MaybeT m a = MaybeT { runMaybeT :: m (Maybe a)
    5 KB (801 words) - 19:04, 8 February 2014
  • * <code>return :: Monad m => a -> m a</code>: | <code>:: m a</code>
    6 KB (988 words) - 04:35, 16 March 2021
  • --slice xs m n = [(xs !! (m-1)) .. (xs !! (n-1))] slice lst 1 m = slice' lst m []
    3 KB (560 words) - 22:51, 3 December 2020
  • duplicate :: Monad m => a -> Producer a m () doubleUp :: Monad m => Consumer String m String
    2 KB (215 words) - 09:14, 19 June 2015
  • ! !! <code>QDiagram ... m</code> !! <code>Diagram</code> ! <code>QDiagram ... m</code>
    3 KB (373 words) - 20:53, 2 June 2017
  • ...ldi ásamt auka upplýsingum. Auka upplýsingarnar eru mismunandi fyrir hvern mónað. Fyrir Either eru auka upplýsingarnar eitt Boolean: annaðhvort Left return :: (Monad m) => a -> m a
    3 KB (553 words) - 12:08, 13 August 2015
  • ack m 0 = ack (m-1) 1 ack m n = ack (m-1) (ack m (n-1))
    7 KB (356 words) - 07:44, 16 November 2019
  • | <haskell>m</haskell> | <haskell>m</haskell>
    5 KB (788 words) - 10:40, 1 February 2024
  • class Map m k v where empty :: m k v
    3 KB (170 words) - 23:05, 29 June 2021
  • fisherYatesStep (m, gen) (i, x) = ((insert j x . insert i (m ! j)) m, gen') {- | @grabble xs m n@ is /O(m*n')/, where @n' = min n (length xs)@
    5 KB (743 words) - 13:10, 9 May 2017
  • Just m -> putLine "" ("Success") doc body showmsg t m doc body =
    4 KB (517 words) - 04:59, 26 April 2021
  • newtype ContT r m a ...tT'' behaves like the identity monad. A computation of type <hask>ContT r m a</hask> is a CPS computation with an intermediate result of type <hask>a</
    12 KB (2,067 words) - 05:43, 9 March 2021
  • f k m | r == 1 = (k,m)
    4 KB (605 words) - 17:09, 18 July 2022
  • instance (Monoid m, Error e) => Monad (DRMonad e s w) where bindDRMonad :: Monoid m => DRMonad a e s w -> (a -> DRMonad b e s w) -> DRMonad b e s w
    6 KB (995 words) - 23:51, 16 April 2021
  • ...hask>m</hask> be a <hask>Monad'</hask>, a type with four parameters: <hask>m s a s' b</hask>. m s a s' b -> ( b -> m s' b s'' c ) -> m s a s'' c
    6 KB (1,053 words) - 03:27, 9 April 2021
  • Student: Hey, you're cheating! I'm the one doing all the work here! I'm generating primes faster than I need them, so really I'm stealing
    3 KB (445 words) - 15:19, 6 February 2021
  • I'm not sure about <code>Style</code> yet. type Context b v m = Style v ::: Name ::: SubMap b v m ::: ()
    7 KB (1,077 words) - 14:56, 12 June 2014
  • * jmelesky: i'm interested. maybe a "wrap a C library for hackage" hackathon?
    274 bytes (36 words) - 02:36, 9 April 2021
  • class Functor m where fmap :: (a -> b) -> m a -> m b
    8 KB (1,232 words) - 01:58, 8 October 2014
  • ...''m'' as precisely what you need in order to fold up a list of values of ''m''. class Semigroup m where
    7 KB (1,101 words) - 02:30, 27 December 2019
  • return :: (Monad m) => a -> m a liftM :: (Monad m) => (a1 -> r) -> m a1 -> m r
    7 KB (1,165 words) - 20:40, 31 October 2019
  • magic m n = m : (magic n (m+n)) ...me expression (bound to <code>m</code> in <code>magic n m = n : magic m (n+m)</code>), and so the second <code>(1+1)</code> is now 2 as well. The first
    4 KB (708 words) - 23:10, 19 April 2021
  • ...framework for writing stateful, elastically scalable, AP microservices. I'm probably going to be working on the cluster rebalancing system. Also, help ...for getting native cross platform GUI up and running quickly and easily. I'm probably going to work on patching the missing Linux High DPI support. Any
    2 KB (362 words) - 15:04, 21 October 2016
  • - foldM :: Monad m => (a -> b -> m a) -> a -> [b] -> m a + foldM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
    14 KB (2,640 words) - 11:47, 26 November 2023
  • problem_21 = sum [m+n | m <- [2..9999], let n = divisorsSum ! m, amicable m n] where amicable m n = m < n && n < 10000 && divisorsSum ! n == m
    8 KB (1,054 words) - 15:53, 11 October 2015
  • newtype ListT m a = ListT { runListT :: m [a] } instance (Monad m) => Monad (ListT m) where
    13 KB (2,036 words) - 13:54, 4 July 2023

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