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
------- RecordSpec.hs | |
{-# LANGUAGE DisambiguateRecordFields #-} -- This is mandatory, even if the 2 records are defined in different modules! | |
module RecordSpec where | |
import Test.Hspec | |
import Record2 | |
data Person = Person { firstName :: String } |
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
{-# OPTIONS_GHC -Wno-type-defaults #-} | |
module FunctionComposition where | |
import Test.Hspec | |
spec :: Spec | |
spec = do | |
it "can use point free style" $ do | |
sum' [1,2,3] `shouldBe` 1 + 2 + 3 |
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
a=$(git tag --points-at HEAD) && a=$(("$a+1")) && echo $a |
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
git config --global alias.git clone \ | |
sudo bash -c \ | |
'echo "gitgit.git 192.30.255.113" \ | |
>> /etc/hosts' | |
git git git://gitgit.git/git/git |
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
[Fact] | |
void final_1() | |
{ | |
int F() | |
{ | |
int i = 1; | |
try | |
{ | |
return i; |
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
fibs = 1: 1: zipWith (+) fibs (tail fibs) |
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
sort [] = [] | |
sort (x:xs) = | |
smallerSorted ++ [x] ++ largerSorted | |
where | |
smallerSorted = sort [a | a <- xs, a <= x] | |
largerSorted = sort [a | a <- xs, a > x ] |
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
;; ordinary factorial | |
(define (zero? n) | |
(= n 0)) | |
(define (decr n) | |
(- n 1)) | |
(define (fact n) |
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
public class LazynessTest | |
{ | |
internal static ITestOutputHelper TestOutputHelper; | |
public LazynessTest(ITestOutputHelper testOutputHelper) | |
{ | |
TestOutputHelper = testOutputHelper; | |
} | |
[Fact] |
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
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { |