SkillAgentSearch skills...

Buildable

Create own FunctionBuilder from Protocol

Install / Use

/learn @tarunon/Buildable
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Buildable

Add FunctionBuilder syntax using Buildable Protocol.

extension Array: Buildable {
  static func empty() -> Array { [] }
  static func merge(_ lhs: Array, _ rhs: Array) -> Array {
    lhs + rhs
  }
}

[Int].build {
  [1, 2, 3]
  if myCondition {
    [4, 5, 6] 
  } else {
    [7, 8, 9]  
  }
}

Related Skills

View on GitHub
GitHub Stars10
CategoryDevelopment
Updated3y ago
Forks1

Languages

Swift

Security Score

60/100

Audited on May 3, 2022

No findings