Skip to content

Instantly share code, notes, and snippets.

View anabastos's full-sized avatar
😭
Sad and Brazilian

Ana Luiza Portello Bastos anabastos

😭
Sad and Brazilian
View GitHub Profile
@anabastos
anabastos / lambdazinhs.js
Last active April 1, 2024 23:48
meus churchezinhos
/*
ChUrChEsZiNhUs
baseado na palestra : https://www.youtube.com/watch?v=VpzhH9CXOy0
*/
const ID = x => x
const TRUE = x => y => x
TRUE("0")("1") // 0
@anabastos
anabastos / dot.el
Last active November 8, 2023 08:49
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
;; or `spacemacs'. (default 'spacemacs)
dotspacemacs-distribution 'spacemacs
@anabastos
anabastos / contact.gif
Last active October 5, 2023 02:08
contact.gif
contact.gif
@anabastos
anabastos / guestbook.gif
Last active May 5, 2023 17:28
guestbook.gif
guestbook.gif
@anabastos
anabastos / my_projects.gif
Last active January 17, 2023 07:11
my_projects.gif
my_projects.gif
@anabastos
anabastos / about.gif
Last active October 27, 2022 00:27
about.gif
about.gif
@anabastos
anabastos / solidIsFp.md
Last active October 16, 2022 22:09
Solid is FP - Luiz Stangarlin

SOLID is FP!

So, I decided to write a little thing, only to practice writing, it's about SOLID being compared between class-based-OO and FP, and there will be grammar errors and there will be a lot of formatting errors, 'bear' with me as I type this as fast as I can. Also correct if I'm wrong. Warning, wall of text in English.

Single responsibility principle

" a class should have only a single responsibility "

A pure function is something with a single responsibility, turning its input into an output. What could be simpler?.

@anabastos
anabastos / my_key.gif
Last active August 29, 2022 18:58
my_key.gif
my_key.gif
@anabastos
anabastos / welcome.gif
Last active March 3, 2022 19:29
welcome.gif
welcome.gif
@anabastos
anabastos / umbrella.js
Last active May 28, 2021 18:53
Umbrella.js
//Solution of https://gist.github.com/lubien/1f09a53a4b5607377166c58a7eb49ae0
const solve = (people, umbrellas) => {
const biggerUmbrella = Math.max(...umbrellas)
const remain = people % biggerUmbrella
const peopleThatFit = Math.floor(people / biggerUmbrella)
if (remain >= 1 && umbrellas.length === 1) {
return -1
} else {