Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make playground run again #35

Merged
merged 1 commit into from
May 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions UsageExamples.playground/Contents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ myString.clamped(to: ..."c")
//: ### clamp(to:)
//: In-place `mutating` variant of `clamped(to:)`

var myNum = 3
myNum.clamp(to: 0 ... 2)
myNum
var myNum2 = 3
myNum2.clamp(to: 0 ... 2)
myNum2

//: ## StringExtension
//: ### string.strip
Expand Down Expand Up @@ -371,8 +371,12 @@ print(weak)
//: `Unowned` is a wrapper to store unowned references to a `Wrapped` instance.
//: ### Unowned(_:)
//: Initialize with an object reference.
var unowned = Unowned(text)
print(unowned)

// This is commented out as there's a bug with Swift playgrounds that would cause a crash if these lines weren't commented.
// See https://github.com/Flinesoft/HandySwift/issues/24 for reference.

// var unowned = Unowned(text)
// print(unowned)

//: ## Withable
//: Simple protocol to make constructing and modifying objects with multiple properties more pleasant (functional, chainable, point-free).
Expand Down