Skip to content

jonreid/ManyOfOne

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a Swift version of Llewellyn Falco's Patterns: Many of One

  • In Method
    • Convert single value to array of 1 value
    • Convert into loop over that array of 1 value
    • Add second value to array
    • Convert everything
  • APIs preserving backwards compatibility
    • Arrays
      • Change parameter from 1 number to a variadic function
      • Alternatively, add a second method overload that takes an array
    • Objects
      • Add Options argument with default value

About

Swift refactoring exercise to teach Many of One pattern

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published