# code-block-pro/1.27.7/build/shiki/samples/mojo.sample

Code Block Pro – Beautiful Syntax Highlighting, version 1.27.7. 11 lines.

- Page: https://pluginprobe.com/plugins/code-block-pro/1.27.7/code/build/shiki/samples/mojo.sample
- Raw: https://pluginprobe.com/plugins/code-block-pro/1.27.7/raw/build/shiki/samples/mojo.sample
- Modified: 2023-09-03T01:04:34+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/code-block-pro/1.27.7/code/build/shiki/samples/mojo.sample#L10-L20`.

```
def softmax(lst):
  norm = np.exp(lst - np.max(lst))
  return norm / norm.sum()

struct NDArray:
  def max(self) -> NDArray:
    return self.pmap(SIMD.max)

struct SIMD[type: DType, width: Int]:
  def max(self, rhs: Self) -> Self:
    return (self >= rhs).select(self, rhs)
```
