Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Exercism

Factor

via Exercism

Overview

Google, IBM & Meta Certificates – 40% Off
One plan covers every Professional Certificate on Coursera.
Unlock All Certificates
Get fluent in Factor by solving 160 exercises. And then level up with mentoring from our world-class team.

Syllabus

  • Hello World
    • Exercism's classic introductory exercise. Just say "Hello, World!".
  • Cargo Shuffle
    • Learn how Factor passes values on the data stack by re-stowing cargo with shuffle words.
  • Leah's Luscious Lasagna
    • Learn about stack effects in Factor by cooking delicious lasagna.
  • Annalyn's Infiltration
    • Learn about boolean expressions by implementing the quest logic for a new RPG.
  • Currency Conversion
    • Learn about numbers in Factor by solving Chandler's currency exchange conundrums.
  • Cars, Assemble!
    • Learn about conditionals in Factor by analyzing the production of an assembly line.
  • Log Levels
    • Learn about strings in Factor by parsing log lines.
  • Character Study
    • Learn about Unicode-aware character handling by helping a Forth Alien with her alphabets project.
  • High School Sweetheart
    • Learn about quotations in Factor by helping high school sweethearts profess their love on social media via unicode art.
  • Joiner's Journey
    • Replace stack shuffling with combinators by helping a furniture workshop plan its cuts.
  • Secrets
    • Learn about bitwise operations in Factor by writing a program to decrypt a message.
  • Bunting Bonanza
    • Help a party robot string up rows of bunting for the bonanza and learn how to build a string from index-driven decisions.
  • Backyard Birdwatcher
    • Learn about sequences in Factor by tracking the birds visiting your garden.
  • Mosaic Making
    • Help build a community mosaic and learn the small toolkit of array constructors and lookups.
  • Boutique Bookkeeping
    • Learn about higher-order sequence words by stocking your fashion boutique.
  • Mosaic Mischief
    • Help log Magpie Marg's mischief by mutating arrays and vectors in place.
  • Librarian's Ledger
    • Tally a librarian's ledger with reduce and the cumulative family of reductions.
  • Coordinate Choreography
    • Learn about curry, compose, and fry quotations by building reusable 2D coordinate transformations.
  • Poetry Club
    • Learn about disjoint sets in Factor by tracking the writing circles of a poetry club.
  • Passphrase Patrol
    • Learn about regular expressions in Factor by validating badge codes and tidying an access log.
  • Ledger Lookout
    • Learn advanced regular expressions in Factor — grouping, lookaround, and options — by parsing a ledger.
  • Lap Leaderboard
    • Walk a list of finishers with each-index, map-index, and times to build the club race's leaderboard.
  • Belgian Boxcars
    • Run the Antwerp marshalling yard by chunking, sliding, and splitting freight-car sequences with group/clump/split-when/monotonic-split.
  • Role Playing Game
    • Learn about tuples in Factor by building the mechanics for a role-playing game.
  • Factory Failsafe
    • Learn about errors in Factor by monitoring machines in a newspaper factory.
  • Bosun's Briefing
    • Help the bosun assemble a watch briefing by factoring small named lines into a helpers vocabulary and composing them in the main file.
  • Purser's Pantry
    • Learn about hashtables in Factor by managing the warehouse inventory.
  • Tellers' Triage
    • Learn about heaps in Factor by serving a bank's customers in priority order.
  • RPN Calculator
    • Learn about quotations and call by building a small RPN calculator.
  • Backyard Birdcount
    • Learn about recursion in Factor by counting visits from your garden's birds.
  • Valentine's Day
    • Learn about case and symbols by rating Valentine's Day plans.
  • Lasagna Luminary
    • Learn about locals in Factor by mastering the lasagna recipe.
  • Mixed Juices
    • Help Li Mei manage her juice bar and learn the while combinator.
  • Garden Gathering
    • Learn about dynamic variables in Factor by managing a community garden's plot registrations.
  • Boardwalk Games
    • Learn about randomness in Factor by running the games of chance at a seaside boardwalk arcade.
  • Ferry Schedule
    • Learn about the calendar vocabulary in Factor by keeping the timetable for an island ferry.
  • Bering Bearings
    • Plot bearings reported in three different forms onto a single chart with generic words and per-class methods.
  • Lighthouse Logbook
    • Track unique vessel sightings and signal-relay reachability with mutable hash-sets and a textbook BFS.
  • Pirates' Path
    • Use a as the BFS frontier through a chart of hidden coves, then cache an expensive gold-lookup with MEMO:.
  • Quayside Crew
    • Run the quayside night shift with cooperative threads, parallel-map, promises, and a lock-protected tonnage tally.
  • Signaler's Satchel
    • Quote values, slice signal flags, and project pairs and triples with the multi-input cleave family.
  • Dragons' Descendants
    • Build a hierarchy of dragon tuples using TUPLE: < parent, then exercise slot and accessor inheritance with one word that ages any descendant.
  • Signal Stencils
    • Build four MACRO: declarations whose bodies run at compile time and return quotations specialised on each call site's literal arguments.
  • Boatswain's Bilge
    • Acquire and release bilge gear with dispose, with-disposal, with-destructors, &dispose, and |dispose, then define a fresh disposable from scratch.
  • Channel Chatter
    • Read, write, and scope bundled streams from the io vocabulary, using the same destructor combinators that release any disposable.
  • Telegrapher's Tape
    • Build a custom input stream that filters noise out of a wireless line — your first taste of Factor's stream protocol and disposable cleanup.
  • Mixtape Maker
    • Learn about combinatorics in Factor by choosing and ordering the songs on a mixtape.
  • Vltava Weather Watch
    • Read, write, and append to files on disk with the whole-file and scoped words of the io.files vocabulary.
  • Collatz Conjecture
    • Calculate the number of steps to reach 1 using the Collatz conjecture.
  • Darts
    • Calculate the points scored in a single toss of a Darts game.
  • Difference of Squares
    • Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.
  • Eliud's Eggs
    • Help Eliud count the number of eggs in her chicken coop by counting the number of 1 bits in a binary representation.
  • ETL
    • Change the data format for scoring a game to more easily add other languages.
  • Grains
    • Calculate the number of grains of wheat on a chessboard given that the number on each square doubles.
  • High Scores
    • Manage a player's High Score list.
  • Micro Blog
    • Given an input string, truncate it to 5 characters.
  • Nucleotide Count
    • Given a DNA string, compute how many times each nucleotide occurs in the string.
  • Pangram
    • Determine whether a phrase uses every letter in the Latin alphabet.
  • Resistor Color
    • Convert a resistor band's color to its numeric representation.
  • Resistor Color Duo
    • Convert color codes, as used on resistors, to a numeric value.
  • Resistor Color Trio
    • Convert color codes, as used on resistors, to a human-readable label.
  • RNA Transcription
    • Given a DNA strand, return its RNA complement.
  • Triangle
    • Determine if a triangle is equilateral, isosceles, or scalene.
  • Two Fer
    • Create a sentence of the form "One for X, one for me.".
  • Acronym
    • Convert a long phrase to its acronym.
  • Atbash Cipher
    • Create an implementation of the Atbash cipher, an ancient encryption system created in the Middle East.
  • Binary Search
    • Implement a binary search algorithm.
  • Bob
    • Bob is a lackadaisical teenager. In conversation, his responses are very limited.
  • Hamming
    • Calculate the Hamming distance between two DNA strands.
  • ISBN Verifier
    • Check if a given string is a valid ISBN-10 number.
  • Isogram
    • Determine whether a phrase is an isogram, a word with no repeated letters.
  • Leap
    • Determine whether a given year is a leap year.
  • Line Up
    • Help lining up customers at YaÊ»qÅ«b's Deli.
  • Phone Number
    • Clean up user-entered phone numbers so that they can be sent SMS messages.
  • Prime Factors
    • Compute the prime factors of a given natural number.
  • Queen Attack
    • Given the position of two queens on a chess board, indicate whether or not they are positioned so that they can attack each other.
  • Raindrops
    • Convert a number into its corresponding raindrop sounds - Pling, Plang and Plong.
  • Reverse String
    • Reverse a given string.
  • Rotational Cipher
    • Create an implementation of the rotational cipher, also sometimes called the Caesar cipher.
  • Scrabble Score
    • Given a word, compute the Scrabble score for that word.
  • Series
    • Given a string of digits, output all the contiguous substrings of length `n` in that string.
  • Sublist
    • Determine if a list is a sublist of another list.
  • Sum of Multiples
    • Given a number, find the sum of all the multiples of particular numbers up to but not including that number.
  • Allergies
    • Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.
  • Armstrong Numbers
    • Determine if a number is an Armstrong number.
  • Bottle Song
    • Produce the lyrics to the popular children's repetitive song: Ten Green Bottles.
  • Complex Numbers
    • Implement complex numbers.
  • D&D Character
    • Randomly generate Dungeons & Dragons characters.
  • Diamond
    • Given a letter, print a diamond starting with 'A' with the supplied letter at the widest point.
  • Flatten Array
    • Take a nested list and return a single list with all values except nil/null.
  • Grade School
    • Given students' names along with the grade that they are in, create a roster for the school.
  • House
    • Output the nursery rhyme 'This is the House that Jack Built'.
  • Kindergarten Garden
    • Given a diagram, determine which plants each child in the kindergarten class is responsible for.
  • Largest Series Product
    • Given a string of digits, calculate the largest product for a contiguous substring of digits of length n.
  • Luhn
    • Given a number determine whether or not it is valid per the Luhn formula.
  • Matrix
    • Given a string representing a matrix of numbers, return the rows and columns of that matrix.
  • Meetup
    • Calculate the date of meetups.
  • Pascal's Triangle
    • Compute Pascal's triangle up to a given number of rows.
  • Protein Translation
    • Translate RNA sequences into proteins.
  • Proverb
    • For want of a horseshoe nail, a kingdom was lost, or so the saying goes. Output the full text of this proverbial rhyme.
  • Rational Numbers
    • Implement rational numbers.
  • Robot Simulator
    • Write a robot simulator.
  • Roman Numerals
    • Convert modern Arabic numbers into Roman numerals.
  • Saddle Points
    • Detect saddle points in a matrix.
  • Sieve
    • Use the Sieve of Eratosthenes to find all the primes from 2 up to a given number.
  • Space Age
    • Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.
  • Twelve Days
    • Output the lyrics to 'The Twelve Days of Christmas'.
  • Word Count
    • Given a phrase, count the occurrences of each word in that phrase.
  • Affine Cipher
    • Create an implementation of the Affine cipher, an ancient encryption algorithm from the Middle East.
  • Anagram
    • Find the words that use the same letters as another word.
  • Circular Buffer
    • A data structure that uses a single, fixed-size buffer as if it were connected end-to-end.
  • Clock
    • Implement a clock that handles times without dates.
  • Crypto Square
    • Implement the classic method for composing secret messages called a square code.
  • Gigasecond
    • Given a moment, determine the moment that would be after a gigasecond has passed.
  • Killer Sudoku Helper
    • Write a tool that makes it easier to solve Killer Sudokus
  • Knapsack
    • Given a knapsack that can only carry a certain weight, determine which items to put in the knapsack in order to maximize their combined value.
  • List Ops
    • Implement basic list operations.
  • Matching Brackets
    • Make sure the brackets and braces all match.
  • Pig Latin
    • Implement a program that translates from English to Pig Latin.
  • Relative Distance
    • Given a family tree, calculate the degree of separation.
  • Robot Name
    • Manage robot factory settings.
  • Run-Length Encoding
    • Implement run-length encoding and decoding.
  • Save the Cow
    • Implement a word-guessing game.
  • Spiral Matrix
    • Given the size, return a square matrix of numbers in spiral order.
  • Split-Second Stopwatch
    • Keep track of time through a digital stopwatch.
  • Square Root
    • Given a natural radicand, return its square root.
  • Tournament
    • Tally the results of a small football competition.
  • Variable Length Quantity
    • Implement variable length quantity encoding and decoding.
  • Yacht
    • Score a single throw of dice in the game Yacht.
  • All Your Base
    • Convert a number, represented as a sequence of digits in one base, to any other base.
  • Binary Search Tree
    • Insert and search for numbers in a binary tree.
  • Change
    • Correctly determine change to be given using the least number of coins.
  • Conway's Game of Life
    • Implement Conway's Game of Life.
  • Flower Field
    • Mark all the flowers in a garden.
  • Food Chain
    • Generate the lyrics of the song 'I Know an Old Lady Who Swallowed a Fly'.
  • Intergalactic Transmission
    • Add parity bits to a message for transmission
  • OCR Numbers
    • Given a 3 x 4 grid of pipes, underscores, and spaces, determine which number is represented, or whether it is garbled.
  • Parallel Letter Frequency
    • Count the frequency of letters in texts using parallel computation.
  • Piecing It Together
    • Fill in missing jigsaw puzzle details from partial data
  • Rail Fence Cipher
    • Implement encoding and decoding for the rail fence cipher.
  • Say
    • Given a number from 0 to 999,999,999,999, spell out that number in English.
  • Two Bucket
    • Given two buckets of different size, demonstrate how to measure an exact number of liters.
  • Word Search
    • Create a program to solve a word search puzzle.
  • Bank Account
    • Simulate a bank account supporting opening/closing, withdraws, and deposits of money. Watch out for concurrent transactions!
  • Book Store
    • To try and encourage more sales of different books from a popular 5 book series, a bookshop has decided to offer discounts of multiple-book purchases.
  • Custom Set
    • Create a custom set type.
  • Dominoes
    • Make a chain of dominoes.
  • Grep
    • Search a file for lines matching a regular expression pattern.
  • PaaS I/O
    • Report network IO statistics.
  • Perfect Numbers
    • Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers.
  • Rectangles
    • Count the rectangles in an ASCII diagram.
  • Satellite
    • Rebuild binary trees from pre-order and in-order traversals.
  • Simple Linked List
    • Write a simple linked list implementation that uses Elements and a List.
  • Wordy
    • Parse and evaluate simple math word problems returning the answer as an integer.
  • Zebra Puzzle
    • Solve the zebra puzzle.
  • Nth Prime
    • Given a number n, determine what the nth prime is.
  • Palindrome Products
    • Detect palindrome products in a given range.
  • Pythagorean Triplet
    • Given an integer N, find all Pythagorean triplets for which a + b + c = N.
  • Connect
    • Compute the result for a game of Hex / Polygon.
  • Alphametics
    • Given an alphametics puzzle, find the correct solution.

Reviews

Start your review of Factor

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.