タグ

software-engineeringとpipe-operatorに関するnabinnoのブックマーク (2)

  • ElixirのPipeに関する7のTips - Qiita

    はじめに Elixir の Pipe は処理の記述を簡潔にすることができる便利なマクロであり、比較的利用する場面は多いことと思います。 この記事では、そんな Pipe に関する、開発が楽しくなるかもしれないちょっとしたTipsを紹介します。 1. IO.inspect を挟んで値を出力 Pipe の途中に IO.inspect を挟み込む ことで、処理している途中の値をコンソールに表示させることができます。 IO.inspect は与えられた値をそのまま戻り値として返すので Pipe の前後の動作に影響を与えることもなく、デバッグ時に有用な方法と言えるでしょう。 defmodule Hoge do def do_something do 10 |> plus(7) |> IO.inspect() |> minus(2) end def plus(x, y), do: x + y def m

    ElixirのPipeに関する7のTips - Qiita
  • Home

    👋 Hi, I'm Yos. Navigating the idea maze and building in web3 ☀️ How to Replace the Bytecode of Deployed Solidity Contracts Sunday, 07 Aug 2022 · 4 min read · ethereum solidity solhint What if there is a hardcoded contract address in another contract you need to test? External dependencies in smart contracts are sometimes stored as immutable and constant variables: contract Vault { // An external

  • 1