TL;DR: There is no concrete (hah!) definition of "concrete type", different people are meaning different things by those words and assuming everyone else means the same thing.
This file contains hidden or 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
dropAt :: Int -> [a] -> [a] | |
dropAt = go id | |
where | |
go :: ([b] -> [b]) -> Int -> [b] -> [b] | |
go f n [] = f [] | |
go f 0 (x:xs) = f xs | |
go f n (x:xs) = go (f . (x:)) (n-1) xs |
This file contains hidden or 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 OverloadedStrings #-} | |
import Control.Concurrent.Async | |
import Control.Concurrent.QSem | |
import Control.Monad | |
import Control.Monad.Catch | |
import Control.Monad.Trans | |
import Control.Monad.Reader | |
import Data.ByteString.Lazy (ByteString) |
This file contains hidden or 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 ScopedTypeVariables #-} | |
module Main where | |
import Control.Monad (forM_) | |
import Data.Maybe (fromMaybe) | |
generalisedFizzBuzz | |
:: forall a f m | |
. (Foldable f, Semigroup m) | |
=> (a -> m) -> (a -> a -> Bool) -> f (a, m) -> a -> m |
This file contains hidden or 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
#include <stdio.h> | |
char X = 'a'; | |
int main(int argc, char* argv[]) | |
{ | |
(void) argc; | |
(void) argv; | |
struct X { |
This file contains hidden or 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
import Foreign | |
main :: IO Int | |
main = peek nullPtr |
An often heard comment is that "typing speed is not the bottleneck in writing code" and "code is read more often than it's written". I think both these assessments are right. If you can afford the time to think up good names, you can take the time to decide on good formatting.
Readability >> consistency
Out-sourcing the formatting to auto-formatters is a weak ass excuse to not think about how formatting can make your code more readable.
OlderNewer