This file contains hidden or 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 times = ( i ) => ( vlr ) => i * vlr | |
const mod11 = ( num ) => num % 11 | |
const times10 = ( num ) => times( 10 )( num ) | |
const isEqual = ( a ) => ( b ) => b === a | |
const isNotEqual = ( a ) => ( b ) => !( isEqual( a )( b ) ) | |
const getDigit = ( cpf ) => cpf.charAt( 9 ) + cpf.charAt( 10 ) | |
const getGeneratedDigit = ( sum1, sum2 ) => times10( sum1 ) + sum2 | |
const generateStringSequence = ( tam ) => ( num ) => `${num}`.repeat( tam ) | |
const gerenateArray = ( length ) => Array.from( { length }, ( v, k ) => k ) |