Skip to content

Instantly share code, notes, and snippets.

View turboMaCk's full-sized avatar
🏠
Working from home

Marek Fajkus turboMaCk

🏠
Working from home
View GitHub Profile
@turboMaCk
turboMaCk / bookmarklet.js
Created May 23, 2020 11:07
Damejidlo.cz - retry order
javascript:(function(){function tryOrder(){window.setTimeout(function(){var btn=document.getElementsByClassName('Button Button--cartContainer')[0],evnt=document.createEvent('Events');evnt.initEvent('click', true, false);btn.dispatchEvent(evnt);tryOrder();},3000)}})()
@turboMaCk
turboMaCk / Partition.hs
Created April 24, 2024 14:39
Tail recursion example
{-# LANGUAGE LambdaCase #-}
module Partition (main) where
-- original implementation
partitionMaybe' :: (a -> Maybe b) -> [a] -> ([(a, b)], [a])
partitionMaybe' f = go
where
go = \case
[] -> ([], [])
(head : tail) ->