Last active
April 1, 2020 11:29
-
-
Save houmanka/be508152e4086d33462d6ca7507456f4 to your computer and use it in GitHub Desktop.
WordProcessor - Eager
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
defmodule WordProcessor do | |
def process_me() do | |
words() | |
|> Enum.map( &process_word/1 ) | |
|> Enum.map( &update_word/1 ) | |
|> Enum.each( &output/1 ) | |
end | |
def process_word(word) do | |
Process.sleep(50) | |
len = String.length(word) | |
[word, len] | |
end | |
def update_word([word, len]) do | |
Process.sleep(50) | |
reverse = String.reverse(word) | |
[reverse, word, len] | |
end | |
def output(arg) do | |
IO.inspect(arg) | |
end | |
def words do | |
[ "abbreviation", "abdication", "aberration", "abjuration", "ablation", "abnegation", "abrogation", "absentation", "acceleration", "accentuation", "acceptation", "acclamation", "acclimation", "accommodation", "acculturation", "accumulation", "accusation", "acetation", "adaptation", "adjudication", "administration", "admiration", "adoration", "adnation", "advocation", "aerification", "aerostation", "aestivation", "affectation", "affiliation", "affirmation", "affixation", "affrication", "aftersensation", "agglomeration", "aggravation", "aggradation", "aggregation", "agitation", "agnation", "air station", "alienation", "alimentation", "alkylation", "allegation", "alleviation", "alliteration", "allocation", "alphabetization", "alsatian", "alteration", "altercation", "alternation", "ammonification", "amortization", "ampliation", "amplification", "amplitude modulation", "amratian", "angular acceleration", "angulation", "animation", "annexation", "annihilation", "annotation", "annunciation", "annulation", "anti-immigration", "anti-isolation", "anticipation", "appellation", "application", "appreciation", "approbation", "approximation", "appropriation", "arbitration", "argumentation", "articulation", "artificial respiration", "aspiration", "asseveration", "assignation", "assimilation", "association", "astronavigation", "attenuation", "attestation", "augmentation", "auscultation", "authorisation", "authorization", "automation", "avocation", "abomination", "adulteration", "amalgamation", "amelioration", "aviation", "beautification", "beatification", "bifurcation", "bilocation", "blood relation", "botheration", "brachiation", "calcification", "calculation", "cancellation", "capitalization", "capitation", "carbonation", "carbonization", "carnation", "causation", "calumniation", "capitulation", "celebration", "centralisation", "centralization", "centrifugation", "cerebration", "certification", "cessation", "celestial navigation", "cetacean", "characterisation", "characterization", "chelation", "chlorination", "chromatic aberration", "circulation", "civilization", "civilisation", "citation", "classification", "claudication", "closed corporation", "codification", "cogitation", "cognation", "collaboration", "collation", "collocation", "coloration", "combination", "comfort station", "commemoration", "commendation", "commination", "communication", "commutation", "compensation", "compilation", "complementation", "complication", "computation", "conservation", "concentration", "alphabetisation", "beneficiation", "coagulation", "coeducation", "columniation", "conciliation", "condemnation", "condensation", "condonation", "confabulation", "confederation", "configuration", "confirmation", "conflagration", "conformation", "confrontation", "confutation", "congelation", "conglomeration", "congratulation", "congregation", "conjugation", "conjuration", "connotation", "consecration", "consideration", "consolation", "consolidation", "constellation", "constatation", "constipation", "consternation", "consubstantiation", "consultation", "consummation", "contamination", "contemplation", "contestation", "continuation", "conurbation", "conversation", "convocation", "cooperation", "copulation", "coronation", "corporation", "correlation", "corroboration", "corrugation", "coruscation", "counterdemonstration", "counterreformation", "creation", "cremation", "crenation", "crepitation", "croatian", "cross-examination", "cross-fertilization", "cross-pollination", "crustacean", "crystallisation", "crystallization", "culmination", "cultivation", "cumulation", "cunctation", "cuspidation", "damnation", "de-stalinization", "deaminization", "debarkation", "decalcification", "decantation", "declaration", "declamation", "declassification", "declination", "decoration", "decortication", "decussation", "dedication", "dedifferentiation", "defalcation", "defamation", "defenestration", "defibrillation", "deflation", "defloration", "deformation", "degeneration", "degradation", "degustation", "deification", "delectation", "delegation", "deliberation", "delimitation", "delineation", "demarcation", "demodulation", "demonstration", "denomination", "denotation", "denudation", "denunciation", "depersonalization", "deportation", "depreciation", "depredation", "deprivation", "deputation", "derivation", "derogation", "desegregation", "desertification", "designation", "desolation", "desperation", "despoliation", "destination", "deterioration", "determination", "detestation", "detoxification", "devaluation", "devastation", "deviation", "dextrorotation", "dictation", "digitalization", "dilatation", "dilapidation", "dilation", "disaffirmation", "disapprobation", "discoloration", "discontinuation", "discrimination", "disembarkation", "disinclination", "disinflation", "disinformation", "disintegration", "dislocation", "disorganization", "dispensation", "disputation", "disqualification", "dissertation", "dissimilation", "dissimulation", "dissipation", "dissociation", "diversification", "divination", "documentation", "domination", "donation", "dramatization", "duplication", "duration", "eburnation", "echolocation", "edification", "education", "ejaculation", "elaboration", "elation", "elevation", "elimination", "elongation", "emaciation", "emanation", "emancipation", "embarkation", "embrocation", "emendation", "emigration", "emulation", "encrustation", "enculturation", "enervation", "enthronization", "enumeration", "enunciation", "equitation", "equivocation", "estimation", "estivation", "evacuation", "evaporation", "eventration", "evocation", "exaggeration", "exaltation", "examination", "exasperation", "excavation", "excitation", "exclamation", "excommunication", "excoriation", "excruciation", "execration", "exemplification", "exfoliation", "exhalation", "exhilaration", "exhortation", "exhumation", "expectation", "expectoration", "experimentation", "expiation", "expiration", "explanation", "explication", "exploitation", "exploration", "exportation", "expostulation", "extenuation", "externalisation", "externalization", "extravasation", "exudation", "exultation", "fabrication", "facilitation", "falsification", "fasciculation", "fascination", "federation", "felicitation", "fellation", "fenestration", "fermentation", "fertilization", "festination", "fibrillation", "figuration", "filiation", "fixation", "flirtation", "floatation", "flotation", "fluctuation", "fluoridation", "foliation", "fomentation", "formation", "formication", "fornication", "fortification", "foundation", "fragmentation", "fructification", "frustration", "fulmination", "furcation", "gallinacean", "gastrulation", "gemination", "gemmation", "generalisation", "generalization", "generation", "gentrification", "gestation", "gesticulation", "glorification", "gradation", "graduation", "granulation", "gratification", "gravitation", "gustation", "gyration", "habitation", "haitian", "hallucination", "hesitation", "horripilation", "hospitalization", "humiliation", "hyalinization", "hydrogenation", "ideation", "identification", "illation", "illumination", "illustration", "imagination", "imbrication", "imitation", "immigration", "immoderation", "immolation", "impartation", "implantation", "implementation", "implication", "importation", "imprecation", "impregnation", "improvisation", "imputation", "in-migration", "incantation", "incarnation", "incitation", "inclination", "incorporation", "incrustation", "incubation", "indemnification", "indentation", "indetermination", "indication", "indignation", "individuation", "induration", "infatuation", "infestation", "infiltration", "inflammation", "inflation", "information", "inhalation", "inhumation", "initiation", "innervation", "innovation", "inoculation", "insinuation", "insolation", "inspiration", "installation", "instauration", "instigation", "instillation", "instrumentation", "insulation", "integration", "intercalation", "interpellation", "interpolation", "interpretation", "interrelation", "interrogation", "intonation", "intoxication", "intravasation", "invagination", "investigation", "invitation", "invocation", "ionization", "irradiation", "irrigation", "irritation", "isolation", "jactitation", "jactation", "jollification", "jubilation", "justification", "laceration", "lachrymation", "lactation", "lallation", "lamentation", "lamination", "lavation", "laxation", "legation", "legislation", "levitation", "levorotation", "libation", "liberation", "libration", "ligation", "limitation", "lineation", "liquidation", "litigation", "location", "lucubration", "lunation", "lusatian", "machination", "maculation", "magnification", "malformation", "malversation", "manifestation", "masturbation", "matriculation", "maturation", "mediation", "medication", "meditation", "melioration", "menstruation", "mensuration", "mentation", "migration", "ministration", "misapplication", "miscegenation", "misinformation", "mispronunciation", "misquotation", "moderation", "modification", "modulation", "molestation", "motivation", "multiplication", "murmuration", "mussitation", "mutation", "myelinization", "narration", "natation", "nation", "navigation", "negation", "negotiation", "neutralization", "nitrification", "nomination", "non-proliferation", "nonparticipation", "notation", "novation", "nullification", "numeration", "nutation", "oblation", "obliteration", "observation", "occultation", "occupation", "operation", "oration", "orientation", "ornamentation", "oscillation", "ossification", "ostentation", "out-migration", "outstation", "pacification", "palpitation", "pandiculation", "participation", "penetration", "percolation", "peregrination", "perforation", "permutation", "peroration", "personification", "perspiration", "perturbation", "phonation", "pigmentation", "placentation", "plantation", "polarisation", "polarization", "pollination", "polymerization", "population", "postulation", "potation", "precipitation", "predation", "predestination", "prefiguration", "premeditation", "preoccupation", "preparation", "presentation", "preservation", "prestidigitation", "privation", "probation", "proclamation", "profanation", "prognostication", "proliferation", "prolongation", "promulgation", "pronation", "pronunciation", "propagation", "propitiation", "prorogation", "prostration", "protestation", "provocation", "publication", "pulsation", "punctuation", "purgation", "purification", "qualification", "quantification", "quotation", "radiation", "radiolocation", "ramification", "ratiocination", "re-creation", "realisation", "recantation", "recapitulation", "reciprocation", "recitation", "reclamation", "recombination", "recommendation", "recreation", "reduplication", "reflation", "reformation", "refrigeration", "refutation", "regeneration", "registration", "regulation", "regurgitation", "reincarnation", "relation", "relaxation", "remediation", "remuneration", "renunciation", "reorganization", "reorientation", "reparation", "replication", "representation", "reprobation", "republication", "repudiation", "reputation", "reservation", "resignation", "respiration", "restoration", "retaliation", "retardation", "reticulation", "revelation", "reverberation", "revivification", "revocation", "rogation", "rotation", "ruination", "rustication", "salivation", "saltation", "salutation", "salvation", "sanguification", "sanitation", "saturation", "sedation", "sedimentation", "segmentation", "segregation", "self-abnegation", "self-accusation", "self-annihilation", "self-condemnation", "self-depreciation", "self-determination", "self-education", "self-examination", "self-fertilization", "self-gratification", "self-incrimination", "self-justification", "self-mortification", "self-pollination", "self-preservation", "self-realization", "self-reformation", "self-renunciation", "sensation", "separation", "sequestration", "serbo-croatian", "serration", "sexploitation", "signification", "simulation", "situation", "solmization", "somnambulation", "sophistication", "spallation", "speciation", "specification", "speculation", "spoliation", "stagflation", "station", "sterilization", "sternutation", "stipulation", "strangulation", "stratification", "striation", "subluxation", "subornation", "subrogation", "substation", "summation", "superannuation", "supererogation", "superfecundation", "superfetation", "supination", "suppuration", "suspiration", "sustentation", "susurration", "syllabication", "syncopation", "taxation", "telecommunication", "temptation", "termination", "tessellation", "testacean", "thracian", "tintinnabulation", "toleration", "transfiguration", "transformation", "translation", "transmutation", "transportation", "transubstantiation", "transudation", "trephination", "trepidation", "triangulation", "tribulation", "truncation", "undulation", "unification", "urtication", "usurpation", "vaccination", "vacation", "vacillation", "valuation", "vaporization", "variation", "variegation", "variolation", "vaticination", "vegetation", "venation", "veneration", "verification", "vermiculation", "vernation", "vesiculation", "vexation", "vibration", "vindication", "visitation", "vituperation", "vocation", "vociferation", "workstation", "actinic radiation", "adult education", "affine transformation", "aid station", "behavior modification", "beta radiation", "comprehensive examination", "cosmic radiation", "criminal conversation", "dark adaptation", "direct examination", "dressing station", "electromagnetic radiation", "electronic communication", "entrance examination", "filling station", "final examination", "fire station", "free association", "frequency modulation", "gamma radiation", "gas station", "grade separation", "heat prostration", "higher education", "indian reservation", "indus civilization", "infantile fixation", "interior decoration", "judicial separation", "legal separation", "light adaptation", "loan translation", "mean deviation", "mental reservation", "mental retardation", "nervous prostration", "oral communication", "oral examination", "paid vacation", "physical education", "police investigation", "police station", "power station", "press association", "protective coloration", "radio station", "redirect examination", "relay station", "service station", "soil conservation", "space station", "spherical aberration", "stimulus generalization", "television station", "unspoken accusation", "veiled accusation", "vertical combination", "vertical integration", "visible radiation", "vocational education", "water conservation", "way station", "weather station", "written communication", "crop rotation", "cross relation", "decimal classification", "false relation", "fatty degeneration", "flight formation", "grid variation", "hill station", "just intonation", "long vacation", "mass observation", "optical rotation", "physical examination", "plane polarization", "sheep station", "synchrotron radiation", "vowel gradation", "word association", "absolute indication", "academic disputation", "acetous fermentation", "actinium emanation", "actuarial calculation", "acute inflammation", "adhesive inflammation", "aggressor nation", "aircraft station", "airship station", "air navigation", "air separation", "aldol condensation", "alien corporation", "all creation", "amateur station", "amyloid degeneration", "analytic continuation", "annihilation radiation", "arachnoid granulation", "arapaho formation", "ardent imagination", "artificial nucleation", "atmospheric attenuation", "atomic disintegration", "atomic radiation", "atrophic inflammation", "backward deviation", "bad reputation", "baptismal regeneration", "barrel amalgamation", "battle station", "beacon station", "belt insulation", "bilinear transformation", "binding arbitration", "biological classification", "blank determination", "block irrigation", "bluff formation", "bold imagination", "border irrigation", "breathless adoration", "bring accusation", "brute creation", "bud variation", "business education", "cameo encrustation", "captive nation", "careful consideration", "cascade amplification", "cattle station", "caucus nomination", "cell multiplication", "cell proliferation", "central administration", "central station", "cerenkov radiation", "charge conjugation", "chattahoochee formation", "chronic inflammation", "cirrhotic inflammation", "clang association", "classical education", "clove carnation", "coastal navigation", "coastwise navigation", "coast station", "cogwheel respiration", "cold sensation", "collateral circulation", "colorful imagination", "color separation", "columbia formation", "comb foundation", "commercial aviation", "committee consideration", "como formation", "comparative relation", "compass deviation", "compulsory arbitration", "cone adaptation", "congressional investigation", "consonantal alliteration", "constructive imagination", "control station", "corrugation irrigation", "corrupt administration", "creative imagination", "criminal investigation", "cross education", "cross modulation", "cross multiplication", "culinary preparation", "daring imagination", "desire concentration", "digital examination", "direct communication", "direct nomination", "direct variation", "display station", "distant relation", "distributive education", "diversified corporation", "divine inspiration", "dosage compensation", "double predestination", "elastic deformation", "electrical communication", "electric refrigeration", "electrolytic dissociation", "electronic navigation", "electronic refrigeration", "elegant variation", "elliptical polarization", "emotional dissociation", "emotional insulation", "endless duration", "epistolary communication", "equivalence relation", "evacuation station", "even permutation", "evil dispensation", "evil reputation", "excited imagination", "expansive classification", "exploratory examination", "external frustration", "external relation", "exudative inflammation", "face presentation", "faithful translation", "faraday rotation", "father fixation", "faulty punctuation", "fertile imagination", "fervent imagination", "fibroid inflammation", "field fortification", "field station", "fiery imagination", "finance corporation", "financial remuneration", "fixed station", "flag station", "floating foundation", "floral decoration", "focal inflammation", "folk nation", "forced resignation", "forced separation", "forest conservation", "freakish inspiration", "free nation", "free translation", "free variation", "freudian fixation", "front elevation", "funeral oration", "furrow irrigation", "galilean transformation", "gas polarization", "gas refrigeration", "general acclamation", "general aviation", "general education", "general information", "germinal imagination", "girdle sensation", "give salvation", "good reputation", "graduated taxation", "grid modulation", "ground elevation", "guarantee association", "halfway station", "ham station", "hard information", "hatching station", "head deformation", "heated imagination", "high celebration", "hold communication", "home station", "homothetic transformation", "hospital station", "hyperplastic inflammation", "hypertrophic inflammation", "immediate communication", "imperceptible duration", "impulse excitation", "infinite duration", "inner station", "input oscillation", "internal frustration", "internal relation", "intransitive relation", "invisible radiation", "ironic implication", "job classification", "joint sensation", "keep station", "key station", "land station", "laplace station", "lardaceous degeneration", "legislative investigation", "liberal education", "libido fixation", "lineal relation", "linear combination", "linear polarization", "linear transformation", "literal translation", "lively imagination", "livingston formation", "long duration", "loose formation", "loose translation", "low estimation", "lozenge perforation", "lurid imagination", "machine computation", "make application", "make compensation", "make conversation", "make expiation", "make reparation", "malicious defamation", "mental alienation", "mental association", "mental dissociation", "mental presentation", "midway formation", "minus acceleration", "mobius transformation", "moneyed corporation", "moon station", "morrison formation", "most-favored-nation clause", "mother fixation", "mutual admiration", "near relation", "necrotic inflammation", "need explanation", "need translation", "negative acceleration", "net valuation", "nuclear radiation", "obliterative inflammation", "odd permutation", "oral interpretation", "outer station", "output oscillation", "pair annihilation", "pampas formation", "pan amalgamation", "parent fixation", "participant observation", "pay reparation", "pay station", "pen cancellation", "perpetual adoration", "persistent lactation", "personality disintegration", "personality disorganization", "phantom acceleration", "pilot station", "placement examination", "plant formation", "plate modulation", "point transformation", "police interrogation", "poor imitation", "poor reputation", "positive declaration", "postgraduate education", "premature acceptation", "price determination", "primary education", "prior consultation", "private aviation", "private information", "privileged communication", "professional education", "prudential administration", "prudent administration", "pseudo application", "pseudo appreciation", "pseudo association", "pseudo authorization", "pseudo cancellation", "pseudo confirmation", "pseudo corporation", "pseudo declaration", "pseudo delegation", "pseudo deputation", "pseudo divination", "pseudo education", "pseudo fertilization", "pseudo information", "pseudo inspiration", "pseudo legislation", "pseudo liquidation", "pseudo meditation", "pseudo occupation", "pseudo participation", "pseudo reformation", "pseudo registration", "pseudo relation", "pseudo resignation", "pseudo sensation", "pseudo tribulation", "psychological fixation", "public administration", "public corporation", "pull station", "punt formation", "race rotation", "radar application", "radar navigation", "radar station", "radial triangulation", "radioactive emanation", "radioactive radiation", "radio communication", "radio navigation", "radium emanation", "rate determination", "regressive taxation", "religious education", "reproductive imagination", "research installation", "research station", "resonance radiation", "response generalization", "restricted information", "rhythmical accentuation", "rich imagination", "ring formation", "ritual contamination", "rod adaptation", "room decoration", "rose carnation", "school vacation", "scientific education", "searching investigation", "self correlation", "seminal imagination", "serous inflammation", "sexual deviation", "sexual invitation", "shady reputation", "shear transformation", "short duration", "show consideration", "similarity transformation", "simple enumeration", "simple inflammation", "social disorganization", "social isolation", "solemn affirmation", "solemn declaration", "sole corporation", "sound compensation", "sound propagation", "sovereign nation", "space exploration", "space navigation", "space variation", "special consideration", "specific inflammation", "spectral classification", "speech situation", "splendid isolation", "spot illustration", "stable oscillation", "stage presentation", "station identification", "stock speculation", "stock station", "stream conservation", "strict interpretation", "striking alteration", "subjective speculation", "suppurative inflammation", "table decoration", "tank station", "technical education", "telepathic hallucination", "telephone insulation", "temperature sensation", "tentative examination", "tentative explanation", "the administration", "the duration", "the information", "thrust augmentation", "torpedo station", "total compensation", "total situation", "toxic inflammation", "transit station", "transverse magnification", "transverse presentation", "traumatic inflammation", "type station", "uncertainty relation", "underdeveloped nation", "undergo deprivation", "under examination", "under investigation", "under probation", "unfair discrimination", "union station", "unit operation", "unsavory reputation", "upon presentation", "vain expectation", "visual examination", "vivid imagination", "vocalic alliteration", "voltage amplification", "weber formation", "wicked imitation", "wildlife conservation", "wild imagination", "window decoration", "wingback formation", "wing formation", "with deliberation", "with premeditation", "with resignation", "write destination", "written examination", "young generation" ] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment