Search results

Jump to navigation Jump to search
  • ...<code>Bool</code>, for instance. Then a function of type <code>(t -> r) -> r</code>, is like a box which takes a question about a value of type <code>t< newtype Cont r t = Cont ((t -> r) -> r)
    7 KB (1,253 words) - 23:34, 25 June 2021
  • cbalTree n = let (q, r) = (n - 1) `quotRem` 2 in [Branch 'x' left right | i <- [q .. q + r],
    4 KB (694 words) - 01:23, 7 June 2021
  • range l r = scanl (+) l (replicate (l - r) 1) range l r = scanl op l $ replicate diff 1
    1 KB (214 words) - 02:08, 5 April 2014
  • removeAt k (x:xs) = let (a, r) = removeAt (k - 1) xs in (a, x:r) removeAt n (x:xs) = (l, x:r)
    2 KB (340 words) - 11:56, 26 April 2016
  • where (l, t', r) = layoutAux x1 1 t layoutAux x y (Branch a l r) = (ll', Branch (a, (x,y)) l' r', rr')
    4 KB (637 words) - 03:42, 10 January 2017
  • ...internals' (Branch x l r) xs = (x :) $ internals' l $ internals' r xs
    717 bytes (98 words) - 13:39, 25 December 2016
  • ...this string representation, if the tree is given as usual (as nil or t(X,L,R) term). Then write a predicate which does this inverse; i.e. given the stri treeToString (Branch x l r) =
    2 KB (372 words) - 03:43, 10 January 2017
  • ...20). Below, I set up the array <hask>r</hask> for exactly that, with <hask>r!0</hask> forced to <hask>True</hask> to bootstrap the whole thing. buyable n = r!n
    6 KB (929 words) - 06:42, 21 November 2020
  • <br /><hask>u :: Empty -> r</hask> <br /><hask>u :: r -> ()</hask>
    7 KB (1,086 words) - 10:33, 9 March 2023
  • symmetric (Branch _ l r) = mirror l r
    1 KB (179 words) - 13:36, 25 December 2016
  • ...en2 -bg '#324c80' -fg '#adbadd' -e '' -ta l -w 400 -fn '-misc-fixed-medium-r-normal-*-14-*-*-*-*-*-*-*'" ...| dzen2 -e '' -x 400 -w 880 -ta r -fg $FG -bg $BG -fn '-misc-fixed-medium-r-normal-*-14-*-*-*-*-*-*-*' &
    2 KB (236 words) - 00:49, 27 January 2018
  • Left l, Right r -> l + r ModDur (Tempo r) d -> d / r
    3 KB (470 words) - 23:09, 11 July 2021
  • filled (Branch _ l r) = [True] : zipWith (++) (filled l) (filled r)... (r, xss'') = cbt xss'
    9 KB (727 words) - 03:41, 10 January 2017
  • foldr (\p r -> p*p > n || ((n `rem` p) /= 0 && r)) | r == 0 = p : go q ps
    4 KB (605 words) - 17:09, 18 July 2022
  • uncompress t x = let (r,_) = runState (bar t) x in r do r <- baz
    8 KB (1,072 words) - 18:32, 16 January 2017
  • countNodes (Branch _ l r) = countNodes l + countNodes r + 1 baltree h n = [Branch x l r |
    3 KB (407 words) - 13:38, 25 December 2016
  • where rand = do r <- randomRIO (0, (length xs) - 1) return (xs!!r)
    4 KB (666 words) - 13:03, 10 May 2014
  • r x = fromJust . find ((== x) . snd) $ t putStrLn . unwords . map fst . head . sort . map (sort . map r) . sol $ n
    1 KB (177 words) - 22:56, 5 April 2021
  • class Resturi r where x :: r -> r
    4 KB (586 words) - 15:17, 6 February 2021
  • ...ient function phi(m) is defined as the number of positive integers r (1 <= r < m) that are coprime to m.
    1 KB (224 words) - 19:44, 18 January 2014

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