---
layout: docs
title: addCaseBlocks
id: class.Facebook.HackCodegen.HackBuilder.addCaseBlocks
docid: class.Facebook.HackCodegen.HackBuilder.addCaseBlocks
permalink: /docs/reference/class.Facebook.HackCodegen.HackBuilder.addCaseBlocks/
---
# Facebook\\HackCodegen\\HackBuilder::addCaseBlocks()




``` Hack
public function addCaseBlocks<T>(
      Traversable<T> $switch_values,
  callable $func,
): this;
```




## Parameters




+ ` Traversable<T> $switch_values `
+ ` callable $func `




## Returns




* ` this `