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
3) Determinar o valor lógico, quando possível, de cada uma das proposições a seguir, mostre o desenvolvimento completo para encontrar a resposta: | |
a) (r ^ (~q > p)) ^ ~((p <> ~q) > r v ~p) | |
sabendo que V(p) = F e V(r) = V | |
(v ^ (~q > F)) ^ ~((F <> ~q) > v v ~F) | |
(v ^ (~q > F)) ^ ~((F <> ~q) > v v ~F) | |
q = V | |
(v ^ (~V > F)) ^ ~((F <> ~V) > v v ~F) |
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
const tamanhoDa = (lista) => lista.length | |
const atéEncontrarOTotal = (total, x ) => n => (total += n) <= x | |
const dividir = (x, y, total = 0) => | |
tamanhoDa( | |
crieUmaListaDeTamanho(x) | |
.ePreenchaCom(y) | |
.filter( atéEncontrarOTotal(total, 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
const tamanhoDa = (lista) => lista.length | |
const dividir = (x, y, total = 0) => | |
tamanhoDa( | |
crieUmaListaDeTamanho(x) | |
.ePreenchaCom(y) | |
.filter( n => (total += n) <= 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
const tamanhoDa = (lista) => lista.length | |
const dividir = (x, y, total = 0) => | |
tamanhoDa( | |
crieUmaListaDeTamanho(x).ePreenchaCom(y) | |
.filter(n => { | |
total = total + n | |
return total <= 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
const tamanhoDa = (lista) => lista.length | |
const dividir = (x, y, passos = 0, total = 0) => { | |
const lista = crieUmaListaDeTamanho(x).ePreenchaCom(y) | |
return tamanhoDa(lista.filter(n => { | |
total = total + n | |
return total <= 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
const tamanhoDa = (lista) => lista.length | |
const dividir = (x, y, passos = 0, total = 0) => { | |
const lista = crieUmaListaDeTamanho(x).ePreenchaCom(y) | |
const listaFinal = lista.filter(n => { | |
total = total + n | |
return total <= 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
// const dividir = (x, y, passos = 0, total = 0) => { | |
// const lista = crieUmaListaDeTamanho(x).ePreenchaCom(y) | |
// while(total < x) { | |
// total += lista[passos] | |
// passos++ | |
// } | |
// return passos |
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
const crieUmaListaDeTamanho = (tam) => ({ | |
ePreenchaCom: (num) => Array(tam).fill(num) | |
}) | |
const somar = (total, num) => total + num | |
const somatorio = (lista) => lista.reduce(somar, 0) | |
const multiplicar = (x, y) => | |
somatorio( | |
crieUmaListaDeTamanho(x).ePreenchaCom(y) |
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
/** | |
Nossa lib de JS Funcional | |
*/ | |
const _pipe = ( f, g ) => ( ...args ) => | |
g( f( ...args ) ) | |
const pipe = ( ...fns ) => | |
fns.reduce(_pipe) |
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
find . -name "node_modules" -type d -prune -print | xargs du -chs |