From 61ac8ef2bbee58276547f27afbd26e772e831b47 Mon Sep 17 00:00:00 2001 From: lijie <1713699517@qq.com> Date: Thu, 6 Apr 2023 16:40:35 +0800 Subject: [PATCH] =?UTF-8?q?ft:=20=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/testCase/utTpfm.erl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/testCase/utTpfm.erl b/src/testCase/utTpfm.erl index 9c06a1d..661ed9f 100644 --- a/src/testCase/utTpfm.erl +++ b/src/testCase/utTpfm.erl @@ -649,4 +649,31 @@ loop() -> loop() end. +td1(List) -> + [{One, One, One, One} || One <- List], + ok. + +td2(List) -> + [{One, One, One, One} || One <- List]. + +forL(0, L) -> + ok; +forL(Index, L) -> + lists:nth(Index, L), + forL(Index - 1, L). + +forL(0, _L, _) -> + ok; +forL(Index, L, _) -> + V = lists:nth(Index, L), + forL(Index - 1, L, V). + +forB(0, _B, _) -> + ok; +forB(Index, B, _) -> + BIndex = Index * 3, + <<_:BIndex/bits, V:3, _/bits>> = B, + forB(Index - 1, B, V). + +