It is known that
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
-- | |
-- Encodes/Decodes string in a string of binaries | |
-- | |
-- Each char is converted to a string with eight 0s or 1s | |
-- λ> encode "The darkside of the force is a pathway to many abilities some consider to be unnatural" | |
-- "0101010001101000011001010010000001100100011000010111001001101011011100110110100101100100011001010 | |
-- 01000000110111101100110001000000111010001101000011001010010000001100110011011110111001001100011011 | |
-- 00101001000000110100101110011001000000110000100100000011100000110000101110100011010000111011101100 |
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
// Typescript playground of this gist: https://www.typescriptlang.org/play?#code/PTAEBUE8AcFMGcCwAoFAXGtQDkD2A7AUQFtoMB5AIwCsAecAPlAF5QBvFUL7nrgbQDSoAJb5QAa1iRcAMwgBdAFygACsIDG4+gBpQAhp15cAvn0nS54eShvIMcHARJlIAQQBO7gIaR6TVnzgugB0oeB88vIA3Lb2WHhEpBh+LI6JLh7evoygAD5pzhQ0frYgoIQAHl6kADYIoLGYoADCBGhe6mipHMg8sMRewjXK8GjuogDm2oZc0AAWBLAjY5PTyMalwLg0oLjiKOoEo6BeoMoJhb6t+O2d-lxs84vKAERe8AAmLxvIh-jHlDOBSSVzaHTQ9zY-UGw1Ab0+3wORy66iBFxBtGutwh3Se+CWcPeX100KGryJiNQyBA22ooFgnlw7kUSP+XQ+aKcGKx4MhPz+xyw5y5LkxYLu3UoNS85IRPxQZRqwmOewav2RoDkwvSyXwAFdiJQGfc+KAAIygXQAJlA1nVbNAE05Ot8o3G+AmJrhZpelrhVt9doVYCVo1ODPcTJZ9uOc2dl1o+sNxtSprtAq6wnjGLdky9FvkQA | |
// My two references: | |
// for lists: https://stackoverflow.com/questions/56006111/is-it-possible-to-define-a-non-empty-array-type-in-typescript | |
// for objs: https://stackoverflow.com/questions/40510611/typescript-interface-require-one-of-two-properties-to-exist | |
// Special thanks to @CaioCSdev https://github.com/CaioCSdev | |
/* |
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
/* | |
* Links para o live coding: | |
* Parte I: https://www.youtube.com/watch?v=11HGQkaOT8c | |
* Parte II: https://www.youtube.com/watch?v=pFYIDtgkYb0 | |
*/ | |
/* | |
* Primeiro problema | |
*/ |
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
;; | |
;; Link para o live coding: https://www.youtube.com/watch?v=IIp9YaXRHVY | |
;; | |
;; | |
;; Exemplo de map | |
;; | |
(map | |
(fn [x] (str "Hello " x)) |